Consider the prime counting function
$$ \pi(x) = \ the \ number \ of \ primes \ less \ than \ or \ equal \ to \ x$$
It is well known due to the sieve eratosthenes that given an integer $n$ and the set of primes less than or equal to $\sqrt{n} = p_1, ... p_k$ that the total number of additional primes generated is:
$$ A(n)= n - \sum_{i = 1}^{k}\left[ \frac{n}{p_i} \right] +\sum_{i = 1, j \ne i, j = 1}^{k,k}\left[ \frac{n}{p_i p_j} \right] ... $$
Based on simple inclusion and exclusion:
Therefore naturally I would assume that
$$\pi(\sqrt{n}) + A(n) = \pi(n)$$
That is primes less than the the root of n plus primes bigger than the root of n but less than n gives all the primes less than n.
But instead the formula in this wiki page: http://en.wikipedia.org/wiki/Prime-counting_function#Algorithms_for_evaluating_.CF.80.28x.29 asserts what I have is:
$$\pi(n) + 1 = \pi(\sqrt{n}) + A(n)$$
Where is this '1' coming from?
You never sieved out $1$, and $1$ is not prime.