4. The number of real solutions to $\frac{1}{5} \log _{2} x=\sin (5 \pi x)$ is?
Consider only those $x$ that satisfy $\left|\frac{1}{5} \log _{2} x\right| \leqslant 1$. Solving this, we get $\frac{1}{32} \leqslant x \leqslant 32$.

First, consider $\frac{1}{32} \leqslant x<1$, in this case $-1 \leqslant \frac{1}{5} \log _{2} x <0$. When $\frac{1}{5} \leqslant x \leqslant \frac{2}{5}, \frac{3}{5} \leqslant x \leqslant \frac{4}{5}$, $\sin 5 \pi x \leqslant 0$.

The graph of $y=\frac{1}{5} \log _{2} x$ intersects at 4 points within $\frac{1}{32} \leqslant x<1$ (as shown in the figure).

When $1<x \leqslant 32$, $0<\frac{1}{5} \log _{2} x \leqslant 1$.
If $\frac{2 k}{5} \leqslant x \leqslant$
$$
\frac{2 k+1}{5}(k=3,4, \cdots,
$$
79), $\sin 5 \pi x=0$.

On these 77 intervals, the graphs of the two functions intersect at $2 \times 74=154$ points. $(1<x \leqslant 32)$
At $x=1$, the graphs of the two functions also intersect at one point.
Therefore, there are a total of $4+154+1=159$ solutions.