Step 1: Translate equal roots into a condition.
A quadratic $ax^2 + bx + c = 0$ has two equal roots precisely when its discriminant is zero. So we will impose $b^2 - 4ac = 0$ on the given equation.
Step 2: Identify the coefficients.
For $x^2 + 2px + q^2 = 0$ we read off \[ a = 1, \quad b = 2p, \quad c = q^2 \]
Step 3: Apply the zero-discriminant condition.
\[ (2p)^2 - 4(1)(q^2) = 0 \implies 4p^2 - 4q^2 = 0 \]
Step 4: Solve the resulting relation between $p$ and $q$.
Dividing by 4 gives $p^2 = q^2$, so $p = \pm q$. Since $q \neq 0$, this is a genuine constraint linking numerator and denominator.
Step 5: Convert each case into a value of $r$.
Recall $r = \dfrac{p}{q}$. If $p = q$ then $r = 1$; if $p = -q$ then $r = -1$. No other ratios are possible, since these are the only solutions of $p = \pm q$.
Step 6: Count the distinct elements.
The set of valid rationals is $S = \{1, -1\}$, which has exactly two elements. This matches option (A).
\[ \boxed{n(S) = 2} \]