8. Let the positive integer $n$ satisfy $n \leqslant 2016$, and $\left\{\frac{n}{2}\right\}+\left\{\frac{n}{4}\right\}+\left\{\frac{n}{6}\right\}+\left\{\frac{n}{12}\right\}=3$. The number of such $n$ is $\qquad$. Here $\{x\}=x-[x]$, where $[x]$ denotes the greatest integer not exceeding $x$.
Consider the remainder of $n$ divided by 12. When and only when $n=12k-1$, the remainder is 11, $\left\{\frac{n}{2}\right\}+\left\{\frac{n}{4}\right\}+\left\{\frac{n}{6}\right\}+\left\{\frac{n}{12}\right\}=\frac{1}{2}+\frac{3}{4}+\frac{5}{6}+\frac{11}{12}=3$.
Let $12k-1 \leqslant 2016 \Rightarrow 12k \leqslant 2017 \Rightarrow k \leqslant 168$, so the number of such $n$ is 168.