4. In the Cartesian coordinate system, there are points $A(-2,2)$, $B(3,2)$, and $C$ is a point on the coordinate axes. If $\triangle ABC$ is a right-angled triangle, then the number of points $C$ that satisfy the condition is ( ) .
(A) 1
(B) 2
(C) 4
(D) 6
4.D.
(1) If $\angle A C B=90^{\circ}$, at this time, $A C^{2}+C B^{2}=A B^{2}$.
(i) As shown in Figure 7, point $C(a, 0)$ is on the $x$-axis, we have
$$
\begin{array}{l}
(a+2)^{2}+ \\
2^{2}+(3-a)^{2}+2^{2} \\
= 5^{2} .
\end{array}
$$

Solving this, we get $a=2$ or $a=-1$.
Thus, we have points $C_{1}(2,0)$ and $C_{2}(-1,0)$.
(ii) Point $C(0, b)$ is on the $y$-axis, we have
$$
(b-2)^{2}+2^{2}+(b-2)^{2}+3^{2}=5^{2} \text {. }
$$

Solving this, we get $b=2 \pm \sqrt{6}$.
Thus, we have points $C_{3}(0,2+\sqrt{6})$ and $C_{4}(0,2-\sqrt{6})$.
(2) If $\angle B A C=90^{\circ}$ or $\angle A B C=90^{\circ}$, at this time, point $C$ must be on the $x$-axis, and we have $C_{5}(-2,0)$ and $C_{6}(3,0)$. In summary, there are 6 points $C$ that satisfy the conditions.