Consider the following function in the interval $[a,b]$ (between $x=a$ and $x=b$)
$$f(x)=\begin{cases}1 & x=A_1\\ 2 & x=A_2\setminus\left\{A_1\bigcap A_2\right\} \end{cases}$$
$$A_1=\left\{\left.\frac{2p+1}{2q+1}\right|p,q\in \mathbb{Z}\right\}$$ $$A_2=\left\{\left.\sqrt{m}-\sqrt{n}\right|m,n\in \mathbb{Z}\right\}$$
(The domain is $x=\left\{{A_1}\bigcup{A_2}\right\}$ such that all possible points in both sets are between $[a,b]$)
I want to create an integral using a measure. In most measures for 1-d functions (Lebesgue, Haar measure, Dirac Measure), countable sets have a measure of zero but this is not useful for measuring countable sets with respect to eachother.
Both $A_1$ and $A_2$ appear to meet the requirements for a measure to exist but I'm not entirely sure. I know that $A_1$ and $A_2$ can be divided into infinitely disjoint unions.
\begin{align} (1)\quad\left\{\left.\frac{2p+1}{2q+1}\right|p,q\in \mathbb{Z}\right\}=\left\{{2p+1}\right\}\bigcup\left\{\frac{2p+1}{3}\right\}\bigcup\left\{\frac{2p+1}{5}\right\}\bigcup{...} \end{align}
\begin{align} (2)\quad\left\{\left.\sqrt{m}-\sqrt{n}\right|m,n \in \mathbb{Z}\right\}=\left\{\sqrt{m}-\sqrt{1}\right\}\bigcup\left\{\sqrt{m}-\sqrt{2}\right\}\bigcup{...} \end{align}
So can we create a measure for $f(x)$ between $[a,b]$ that compares the measure for $A_1$ with respect to $A_2$ and vice versa? How could we apply such a measure for $f(x)$?
Currently Im not sure how to create a formal measure, so I decided to take the total sum of the number points that each of disjoint unions $\left(\text{on the right-side of the equalities} \, (1) \, \text{and} \, (2) \, \right)$ have between $[a,b]$.
I also believe that $2Q+1$ where $q$ is large and $\sqrt{N}$ where $n$ is large, we should set both values to $p$ inorder to also compare the density of $2q+1$ and $\sqrt{n}$. Hence for $2q+1=p$ we get $Q=\left\lfloor\frac{p-1}{2}\right \rfloor$ and $\sqrt{n}=p$ we have $N=\lfloor{p^2}\rfloor$.
In the case of $A_1=\left\{\left.\frac{2p+1}{2q+1}\right|m,n \in \mathbb{Z}\right\}$ we can set $A_1$ to equal $a$ and $b$ in terms of $p$. Then we can subtract the different $p$ values of $a$ and $b$ to get the number points $A_1$ has between $[a,b]$ for every $q$.
$$\begin{align} \frac{2p+1}{2q+1}=a&&\frac{2p+1}{2q+1}=b \end{align}$$
$$\begin{align} p=\frac{a(2p+1)-1}{2}&&p=\frac{b(2p+1)-1}{2} \end{align}$$
$$\begin{align} p=\left\lceil\frac{a(2p+1)-1}{2}\right\rceil&&p=\left\lfloor\frac{b(2q+1)-1}{2}\right\rfloor\end{align}$$
Substituting into $2p+1$ we should get the following sum.
$$\sum_{q=1}^{Q}\left(2\left\lfloor\frac{b(2q+1)-1}{2}\right\rfloor+1\right)-\left(2\left\lceil\frac{a(2p+1)-1}{2}\right\rceil+1\right)$$
$$(3)\quad D_{1}(p)=\sum_{q=1}^{\left\lfloor\frac{p-1}{2}\right\rfloor} 2\left\lfloor\frac{b(2q+1)-1}{2}\right\rfloor-2\left\lceil\frac{a(2p+1)-1}{2}\right\rceil$$
The same method can be done with $\left\{\left.\sqrt{m}-\sqrt{n}\right|m,n \in \mathbb{Z}\right\}$. Using $(2)$ we can solve in terms of $n$ for $b$ and $a$ and subtract both results to get the number of points $A_2$ has between $[a,b]$ for every $m$.
$$(4) \quad D_{2}(p)=\sum_{n=1}^{\left\lfloor p^2\right\rfloor} \left\lfloor{\left(b+\sqrt{n}\right)^{2}}\right\rfloor-\left\lceil{(a+\sqrt{n})^{2}}\right\rceil$$
It seems that if we take the following ratio we get $\lim_{p\to\infty}\frac{D_1(p)}{D_2(p)}=0$. Hence $D_2(q)$ is infinitely greater than $D_1(q)$. Hence $D_1(p)$ should have measure of $0$ and $D_2(p)$ should have a measure of $1$.
So by this new measure (integral), we would end up with the following.
$$0\int_{a}^{b}1+1\int_{a}^{b}2=\Bigl|_{a}^{b}x=b-a$$
Is the following the correct way of creating such a measure?