8. 3 .

Let the equation of the parabola be $y^{2}=2 p(x-a)$. Given $a=\frac{p}{2}$, we have $2 p=4 a$, which means the equation of the parabola is $y^{2}=4 a(x-a)$ $(x \in[a,+\infty))$. Let $Q(x, y)$ be a point on the parabola, then
$$
|A Q|=\sqrt{(x-4)^{2}+y^{2}}=\sqrt{x^{2}-(8-4 a) x+16-4 a^{2}}=\sqrt{[x-(4-2 a)]^{2}+16 a-8 a^{2}} .
$$

When $4-2 a \geqslant a$, i.e., $a \leqslant \frac{4}{3}$, $|A Q|$ has a minimum value of $\sqrt{16 a-8 a^{2}}=2$, solving for $a$ gives $a=1 \pm \frac{\sqrt{2}}{2}$. Since $1+\frac{\sqrt{2}}{2}>\frac{4}{3}$, only $a=1-\frac{\sqrt{2}}{2}$ is valid.
When $4-2 a< a$, i.e., $a>\frac{4}{3}$, $|A Q|$ has a minimum value of $|a-4|=2$, solving for $a$ gives $a=2$ or 6.
Therefore, there are 3 parabolas that satisfy the conditions, which are $y^{2}=(4-2 \sqrt{2})\left(x-1+\frac{\sqrt{2}}{2}\right)$, $y^{2}=8(x-2)$, and $y^{2}=24(x-6)$.
8. Given that the vertex of a parabola is on the $x$-axis, the directrix is the $y$-axis, and the shortest distance from point $A(4,0)$ to a point on the parabola is 2. Then, the number of such parabolas is $\qquad$.