5. If $x$ is a real number, denote $\{x\}=x-[x]$ (where $[x]$ represents the greatest integer not exceeding $x$), then the number of real roots of the equation
$$
2006 x+\{x\}=\frac{1}{2007}
$$

is ( ).
(A) 0
(B) 1
(C) 2
(D) an integer greater than 2
5.C.

Since $x=[x]+\{x\}$, the original equation can be transformed into $2006[x]+2007\{x\}=\frac{1}{2007}$.

Also, $0 \leqslant 2007\{x\}<2007$, so, $[x]=-1$ or $[x]=0$.
If $[x]=-1$, then
$$
\begin{array}{l}
\{x\}=\frac{2006 \times 2007+1}{2007^{2}}=\frac{2007^{2}-2007+1}{2007^{2}} \\
=1-\frac{2006}{2007^{2}}<1 .
\end{array}
$$

Therefore, $x=-1+1-\frac{2006}{2007^{2}}=-\frac{2006}{2007^{2}}$. If $[x]=0$, then $\{x\}=\frac{1}{2007^{2}}$, which means $x=\frac{1}{2007^{2}}$. In summary, $x_{1}=-\frac{2006}{2007^{2}}, x_{2}=\frac{1}{2007^{2}}$.