I like your caution in avoiding 1 on the count! When computing $\frac{\pi(x)}{x}$, though, that should already take care of itself. For instance, we know that $\pi(10) = 4$ since the primes at or below 10 are $\{2,3,5,7\}$. So we get $\frac{\pi(x)}{x}}$ at $x = 10$ is equal to $\frac{4}{10}$. Not that this is a huge deal, and I agree with you morally that we shouldn't be including "1" in the count in the denominator since it is removed by *fiat* in the numerator. Alas, though, the tradition is to look at $\frac{\pi(x)}{x}$ instead of $\frac{\pi(x)}{x-1}$.

More to your point, though, I really like this attempt to approximate $\pi(x)$ by "subtracting away" those groups which you know to be composite. I think this does have a chance to get a bit closer as you allow for larger values of *x* — maybe trying 100 will get this working closer to the actual value? You'd also need to be careful that when "adding back in" the overlap that you don't add too much back in. For instance, you will plan on "adding back in 1/6" to take are of the common multiples of 2 and 3. You'll do a similar correction when considering common multiples of 2 and 5 or common multiples of 3 and 5. But what about common multiples of 2,3 and 5? In correcting for overcounting for each of the pairs of primes, you'll have overcorrected for common multiples of all 3. This means you'll need to subtract away one-thirtieth to correct for your correction.

Anyone want to take a crack at implementing this idea on a computer? I think it would be really interesting to see what happens when you plug in large numbers — like 100 or 1000.