4. Given the parabola $y=-x^{2}+x-m$ intersects the $x$-axis at two different points, and the sum of the distances from these two points to the origin does not exceed 5. Then the number of integer values of $m$ is ( ).
(A) 7
(B) 6
(C) 5
(D) 4
4. A.

Let the x-coordinates of the two distinct intersection points of the parabola with the x-axis be \( x_{1} \) and \( x_{2} \). Then
$$
\Delta=1-4 m>0 \Rightarrow m<\frac{1}{4} \text {, }
$$

and
$$
\begin{array}{l}
\left(\left|x_{1}\right|+\left|x_{2}\right|\right)^{2} \\
=\left(x_{1}+x_{2}\right)^{2}+2\left|x_{1} x_{2}\right|-2 x_{1} x_{2} \\
=1+2|m|-2 m \leqslant 25 .
\end{array}
$$

Thus, \( -6 \leqslant m<\frac{1}{4} \).
Therefore, there are 7 integer values for \( m \).