4. The graphs of the functions $y=x^{2}-x$ and $y=\cos 10 \pi x(x \geqslant 0)$ intersect at $\qquad$ points.
4.17.

When $x \geqslant 0$, from $\left|x^{2}-x\right| \leqslant 1$, we get
$$
0 \leqslant x \leqslant \frac{1+\sqrt{5}}{2}=1.618 \cdots \text {. }
$$
The period of $y=\cos 10 \pi x$ is $\frac{1}{5}$. Within each period, if $\left|x^{2}-x\right|<1$, then the graphs of $y=x^{2}-x$ and $y=\cos 10 \pi x$ have 2 intersection points. In the interval $[0,1.6]$, $\cos 10 \pi x$ has 8 periods, resulting in 16 intersection points: In the interval $\left(1.6, \frac{1+\sqrt{5}}{2}\right)$, the two curves have 1 more intersection point. Therefore, there are a total of 17 intersection points (as shown in Figure 1).