Example 1-29 How many terms are there in $(x+y+z)^{4}$?
$$
(x+y+z)^{4}=(x+y+z) \cdot(x+y+z) \cdot(x+y+z) \cdot(x+y+z)
$$

The expansion is equivalent to taking one term from each of the parentheses on the right and multiplying them together, which can be analogized to: placing 4 indistinguishable balls into 3 distinguishable boxes labeled $x, y, z$, where a box can contain more than one ball. For example, $x^{4}$ can be seen as all 4 balls being placed in the box labeled $x$. Another example, $x^{2} y z$ can be seen as the $x$ box having 2 balls, and the $y$ and $z$ boxes each having one ball.
Thus, the problem is equivalent to selecting 4 items from 3 elements with repetition allowed, and the number of combinations is
$$
\binom{4+3-1}{4}=\binom{6}{4}=\frac{6!}{4!2!}=\frac{30}{2}=15
$$
$(x+y+z)^{4}$ has a total of 15 terms.
$$
\begin{aligned}
(x+y+z)^{4}= & (x+y+z)^{2} \cdot(x+y+z)^{2} \\
= & \left(x^{2}+y^{2}+z^{2}+2 x y+2 x z+2 y z\right)^{2} \\
= & x^{4}+y^{4}+z^{4}+4 x^{3} y+4 x^{3} z+4 y^{3} x+4 y^{3} z \\
& +4 y^{3} z+4 y^{3} x+6 x^{2} y^{2}+6 x^{2} z^{2}+6 y^{2} z^{2} \\
& +4 x y z^{2}+4 x y^{2} z+4 x^{2} y z
\end{aligned}
$$