8. In the interval $[0, \pi]$, the number of solutions to the trigonometric equation $\cos 7 x=\cos 5 x$ is $\qquad$
$$
\cos 7 x-\cos 5 x=-2 \sin 6 x \sin x=0 \Rightarrow 6 x=k \pi \Rightarrow x=\frac{k \pi}{6}, k=0,1, \cdots, 6 \text {. }
$$

So the number of solutions in the interval $[0, \pi]$ is 7.