To solve the problem, we need to analyze the given equation of a circle and find the integral values of \( p \) and \( q \) that satisfy the conditions.
### Step-by-Step Solution:
1. **Given Equation**: The equation provided is
\[
x^2 + y^2 + px + y(1 - p) = 0.
\]
We can rearrange this as:
\[
x^2 + y^2 + px + (1 - p)y = 0.
\]
2. **Identifying Circle Parameters**: The general form of a circle's equation is
\[
x^2 + y^2 + 2gx + 2fy + c = 0,
\]
where \( g \) and \( f \) are related to the center of the circle, and \( c \) is a constant.
By comparing coefficients, we identify:
- \( 2g = p \) → \( g = \frac{p}{2} \)
- \( 2f = 1 - p \) → \( f = \frac{1 - p}{2} \)
- \( c = 0 \)
3. **Radius of the Circle**: The radius \( R \) of the circle can be calculated using the formula:
\[
R = \sqrt{g^2 + f^2 - c}.
\]
Substituting the values we found:
\[
R = \sqrt{\left(\frac{p}{2}\right)^2 + \left(\frac{1 - p}{2}\right)^2}.
\]
4. **Simplifying the Radius**:
\[
R = \sqrt{\frac{p^2}{4} + \frac{(1 - p)^2}{4}} = \sqrt{\frac{p^2 + (1 - 2p + p^2)}{4}} = \sqrt{\frac{2p^2 - 2p + 1}{4}} = \frac{\sqrt{2p^2 - 2p + 1}}{2}.
\]
5. **Setting Up the Radius Condition**: We know that the radius must satisfy:
\[
0 < R \leq 5.
\]
Squaring both sides gives:
\[
0 < \frac{2p^2 - 2p + 1}{4} \leq 25.
\]
Multiplying through by 4 results in:
\[
0 < 2p^2 - 2p + 1 \leq 100.
\]
6. **Solving the Inequalities**:
- From \( 2p^2 - 2p + 1 > 0 \): This quadratic has no real roots (discriminant \( D = (-2)^2 - 4 \cdot 2 \cdot 1 < 0 \)), so it is always positive.
- From \( 2p^2 - 2p + 1 \leq 100 \):
\[
2p^2 - 2p - 99 \leq 0.
\]
Solving the quadratic \( 2p^2 - 2p - 99 = 0 \) using the quadratic formula:
\[
p = \frac{-(-2) \pm \sqrt{(-2)^2 - 4 \cdot 2 \cdot (-99)}}{2 \cdot 2} = \frac{2 \pm \sqrt{4 + 792}}{4} = \frac{2 \pm \sqrt{796}}{4} = \frac{2 \pm 2\sqrt{199}}{4} = \frac{1 \pm \sqrt{199}}{2}.
\]
7. **Finding the Roots**: Approximating \( \sqrt{199} \approx 14.1 \):
- \( p_1 \approx \frac{1 - 14.1}{2} \approx -6.55 \)
- \( p_2 \approx \frac{1 + 14.1}{2} \approx 7.55 \)
Thus, the range for \( p \) is:
\[
-6.55 < p < 7.55.
\]
8. **Finding Integral Values of \( p \)**: The integral values of \( p \) in this range are:
\[
-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7.
\]
This gives us a total of 14 integral values.
9. **Finding Corresponding Values of \( q \)**: Since \( q = p^2 \), for each integral \( p \), \( q \) will also be an integer.
### Conclusion:
The number of integral values of \( (p, q) \) that satisfy the conditions is **14**.