A didactic example of logarithmic measure I've read that two mathematicians, in the recent past, studied limits as $X$ tends to infinite, like as 
$$\frac{1}{\log X}\sum_{x\leq X:\pi(x)<\int_{2}^x\frac{dt}{\log t}}\frac{1}{x},$$
where $\pi(y)$ is the prime counting function.
I would like see the proof of some cheap statements like this, for some series of kind $\frac{1}{G(X)}\sum_{x\leq X:s(x)<g(x)}f(x)$, where $s(x)$ is some step counting function, and $f(x),g(x)$ are, for example, real continuos functions. If it is possible your example to be inspired in (easy) functions from analytic number theory. If it is possible, as you take $G(x)=\log X$ (it is, I would like see a cheap statement but with functions, if it is possible like previous functions and related with analytic number theory).

Question. Can you show an example going from the anaytic number theory (or from your invention), giving details about how you do the computations, of logarithmic measure with finite limit $l>0$
  $$l=\lim_{X\to\infty}\frac{1}{\log X}\sum_{x\leq X:s(x)<g(x)}f(x)?$$ 
  Specially how count $x\leq X:s(x)<g(x)$, summing over this set, and how compute the asymptotic.

Thanks in advance.
 A: Let $A
 $ a subset of $\mathbb{N}
 $. Then we call the logarithmic density of $A
 $ the following limit: $$\delta\left(A\right)=\lim_{n\rightarrow\infty}\frac{1}{\log\left(n\right)}\sum_{k\leq n,\, k\in A}\frac{1}{k}
 $$ so for the calculation of the limit we have to calculate (or get an estimation) of that sum. There isn't only a way, you have to understand what is the best tool in your situation. Let's consider a simple example. Assume we want know the logarithmic densty of the primes. So in our case we have $$\delta\left(A\right)=\lim_{n\rightarrow\infty}\frac{1}{\log\left(n\right)}\sum_{p\leq n}\frac{1}{p}.
 $$ Since by the PNT we know that $\pi\left(n\right)\sim\frac{n}{\log\left(n\right)}
 $ for the estimation of that sum we can use the Abel's summation, and so $$\sum_{p\leq n}\frac{1}{p}=\sum_{p\leq n}1\cdot\frac{1}{p}=\frac{\pi\left(n\right)}{n}+\int_{2}^{n}\frac{\pi\left(t\right)}{t^{2}}dt\sim\frac{1}{\log\left(n\right)}+\int_{2}^{n}\frac{1}{t\log\left(t\right)}dt\sim\log\left(\log\left(n\right)\right)
 $$ then we have $$\frac{1}{\log\left(n\right)}\sum_{p\leq n}\frac{1}{p}\sim\frac{\log\left(\log\left(n\right)\right)}{\log\left(n\right)}
 $$ and so the limit is $0$. 
