Example 2.10 Find $\pi(36)$.
Solution: The prime numbers not greater than $\sqrt{36}=6$ are as follows: $2,3,5$, so
$$
\begin{aligned}
\pi(36)= & 3-1+36-\left(\left[\frac{36}{2}\right]+\left[\frac{36}{3}\right]+\left[\frac{36}{5}\right]\right)+ \\
& \left(\left[\frac{36}{2 \times 3}\right]+\left[\frac{36}{2 \times 5}\right]+\left[\frac{36}{3 \times 5}\right]\right)-\left[\frac{36}{2 \times 3 \times 5}\right] \\
= & 38-(18+12+7)+(6+3+2)-1 \\
= & 11 .
\end{aligned}
$$

It is easy to find the 11 prime numbers not greater than 36, they are $2,3,5,7,11,13,17$, $19,23,29,31$.