Example 12 Given a positive integer $n$ less than 2006, and $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right]=\frac{n}{2}$. Then the number of such $n$ is $\qquad$.
(2006, National Junior High School Mathematics Competition)
From the properties of the Gaussian function, we know that $\left[\frac{n}{3}\right] \leqslant \frac{n}{3}$, with equality holding if and only if $\frac{n}{3}$ is an integer; $\left[\frac{n}{6}\right] \leqslant \frac{n}{6}$, with equality holding if and only if $\frac{n}{6}$ is an integer.
Therefore, $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right] \leqslant \frac{n}{3}+\frac{n}{6}=\frac{n}{2}$.

Equality holds in the above inequality if and only if $\frac{n}{6}$ is an integer.
Thus, $\frac{n}{6}$ is an integer.
Since the positive integer $n$ is less than 2006, the number of $n$ that satisfy the condition is $\left[\frac{2005}{6}\right]=334$.