6. [ $x$ ] represents the greatest integer not greater than $x$. The number of all real solutions to the equation $[2 x]+[3 x]=8 x-\frac{7}{2}$ is ( ).
(A) 1
(B) 2
(C) 3
(D) 5
6. B.

From the equation, we get $8 x-\frac{1}{2}=3+[2 x]+[3 x] \in \mathbf{Z}$.
Let $8 x-\frac{1}{2}=n(n \in \mathbf{Z})$, then
$$
x=\frac{2 n+1}{16} \text {. }
$$

From $x-1<[x] \leqslant x$, we get
$$
5 x-2<8 x-\frac{7}{2}=[2 x]+[3 x] \leqslant 5 x \text {. }
$$

Therefore, $\frac{1}{2}<x \leqslant \frac{7}{6}$.
From equations (1) and (2), we get $\frac{1}{2}<\frac{2 n+1}{16} \leqslant \frac{7}{6}$, which means $\frac{7}{2}<n \leqslant \frac{53}{6}$. Since $n$ is an integer, we have
$$
4 \leqslant n \leqslant 8 \text {. }
$$

From equations (1) and (3), we get that $x$ can only take the values
$$
\frac{9}{16}, \frac{11}{16}, \frac{13}{16}, \frac{15}{16}, \frac{17}{16} \text {. }
$$

Upon inspection, only $x=\frac{13}{16}, \frac{17}{16}$ satisfy the problem's requirements.