4. As shown in Figure 2, in the right triangle $\triangle ABC$, $\angle ABC = 90^{\circ}$, $AB = \frac{1}{2} AC$. Take a point $P$ on the line $AB$ or $BC$ such that $\triangle PAC$ is an isosceles triangle. Then, the number of points $P$ that satisfy the condition is $(\quad)$.
(A) 4
(B) 6
(C) 7
(D) 8
4.B.
(1) If $AC$ is the leg of isosceles $\triangle PAC$, then draw circles with $A$ and $C$ as centers and the length of segment $AC$ as the radius. They intersect the lines $AB$ and $BC$ at 5 different points
$$
P_{1}, P_{2}, P_{3}, P_{4}, P_{5} \text{ (Note: }
$$

Since $AB = \frac{1}{2} AC$,
the two circles intersect at the same point $P_{1}$ below point $B$), as shown in Figure 6.
(2) If $AC$ is the base of isosceles
$\triangle PAC$, draw the perpendicular bisector of segment $AC$, which intersects the lines $AB$ and $BC$ at points $P_{1}$ and $P_{6}$, as shown in Figure 6.
In summary, there are 6 points $P$ that satisfy the conditions.