5. In the Cartesian coordinate system, given points $A(2,2), B(2$, $-3)$, point $P$ is on the $y$-axis, and $\triangle A P B$ is a right triangle. Then the number of points $P$ is ( ).
(A) 2
(B) 3
(C) 1
(D) 4
5.D.

As shown in Figure 6.