(5) The number of rational solutions $(x, y, z)$ for the system of equations $\left\{\begin{array}{l}x+y+z=0, \\ x y z+z=0, \\ x y+y z+x z+y=0\end{array}\right.$ is
(A) 1
(B) 2
(C) 3
(D) 4
(5) If $z=0$, then
$$
\left\{\begin{array}{l}
x+y=0 \\
x y+y=0
\end{array}\right.
$$

Solving, we get
$$
\left\{\begin{array} { l } 
{ x = 0 , } \\
{ y = 0 }
\end{array} \text { or } \left\{\begin{array}{l}
x=-1, \\
y=1 .
\end{array}\right.\right.
$$

If $z \neq 0$, then from $x y z+z=0$ we get
$$
x y=-1 \text {. }
$$

From $x+y+z=0$ we get
$$
z=-x-y .
$$

Substituting (2) into $x y+y z+x z+y=0$ we get
$$
x^{2}+y^{2}+x y-y=0 .
$$

From (1) we get $x=-\frac{1}{y}$, substituting into (3) and simplifying we get
$$
(y-1)\left(y^{3}-y-1\right)=0 .
$$
$\square$
It is easy to see that $y^{3}-y-1=0$ has no rational roots, so $y=1$, from (1) we get $x=-1$, from (2) we get $z=0$, which contradicts $z \neq 0$. Therefore, the system of equations has two rational solutions:
$$
\left\{\begin{array}{l}
x=0, \\
y=0, \text { or } \\
z=0
\end{array} \quad \begin{array}{l}
x=-1, \\
y=1, \\
z=0 .
\end{array}\right.
$$

Therefore, the answer is B.