9. Let $[x]$ denote the greatest integer not exceeding the real number $x$. The number of real roots of the equation $\lg ^{2} x-[\lg x]-2=0$ is . $\qquad$
Solving
Since $\lg ^{2} x-[\lg x]-2=0 \Rightarrow \lg ^{2} x=[\lg x]+2 \geqslant 0 \Rightarrow[\lg x] \geqslant-2$.
When $[\lg x]=-2$, $\lg ^{2} x=0$, no solution; When $[\lg x]=-1$, $\lg ^{2} x=1 \Rightarrow x=\frac{1}{10}$;
When $[\lg x]=0$, $\lg ^{2} x=2$, no solution; When $[\lg x]=1$, $\lg ^{2} x=3 \Rightarrow \lg x=\sqrt{3}$;
When $[\lg x]=2$, $\lg ^{2} x=4 \Rightarrow x=100$.
When $[\lg x]>2$, $\lg ^{2} x-[\lg x]-2 \geqslant[\lg x]^{2}-[\lg x]-2=([\lg x]+1)([\lg x]-2)>0$,
Therefore, the number of real roots of the equation $\lg ^{2} x-[\lg x]-2=0$ is 3.