Example 3-18 For the problem
$$
\begin{array}{c}
x_{1}+x_{2}+x_{3}=15 \\
0 \leqslant x_{1} \leqslant 5, \quad 0 \leqslant x_{2} \leqslant 6, \quad 0 \leqslant x_{3} \leqslant 7
\end{array}
$$

Find the number of integer solutions.
If the solution without the upper bound condition according to formula ( *) should be
$$
\binom{15+3-1}{15}=\binom{17}{15}=\binom{17}{2}=272 / 2=136
$$

For problems with upper bounds, just make a transformation
$$
\begin{array}{c}
\xi_{1}=5-x_{1}, \quad \xi_{2}=6-x_{2}, \quad \xi_{3}=7-x_{3} \\
x_{1}+x_{2}+x_{3}=5-x_{1}+6-x_{2}+7-x_{3} \\
=18-\left(x_{1}+x_{2}+x_{3}\right)=3, \quad 0 \leqslant x_{1} \leqslant 5
\end{array}
$$

This leads to $\xi_{1}=5-x_{1} \geqslant 0$, similarly $\xi_{2} \geqslant 0, \xi_{3} \geqslant 0$
Thus the problem becomes
$$
\begin{array}{c}
\xi_{1}+\xi_{2}+\xi_{3}=3, \\
\xi_{1} \geqslant 0, \quad \xi_{2} \geqslant 0, \quad \xi_{3} \geqslant 0
\end{array}
$$

The number of integer solutions
$$
\binom{2+3}{2}=\binom{5}{2}=\frac{5 \times 4}{2}=10
$$

Or from the non-negative integer solutions of the original problem $S,|S|=272$, let the subset of $S$ with $x_{1} \geqslant 6$ be $A_{1}$, the subset with $x_{2} \geqslant 7$ be $A_{2}$, and the subset with $x_{3} \geqslant 8$ be $A_{3}$. The problem is transformed into finding $\left|\bar{A}_{1} \cap \bar{A}_{2} \cap \bar{A}_{3}\right|$.
For $A_{1}$, it is equivalent to
$$
\left(x_{1}+6\right)+x_{2}+x_{3}=15 \text { or } x_{1}+x_{2}+x_{3}=9
$$

The number of non-negative integer solutions with property $A_{1}$ is
$$
\left|A_{1}\right|=\binom{9+3-1}{9}=\binom{11}{2}=55
$$

The number of non-negative integer solutions with property $A_{2}$, leads to
$$
\begin{array}{c}
\eta_{1}+\eta_{2}+\eta_{3}=8 \\
\eta_{1} \geqslant 0, \quad \eta_{2} \geqslant 0, \quad \eta_{3} \geqslant 0 \\
\left|A_{2}\right|=\binom{10}{2}=45
\end{array}
$$

Similarly
$$
\begin{array}{l}
\qquad\left|A_{3}\right|=\binom{9}{2}=36 \\
\left|A_{1} \cap A_{2}\right|=\binom{(15-6-7)+3-1}{2}=\binom{4}{2}=6 \\
\left|A_{1} \cap A_{3}\right|=\binom{3}{2}=3, \quad\left|A_{2} \cap A_{3}\right|=\binom{2}{2}=1 \\
\left|A_{1} \cap A_{2} \cap A_{3}\right|=0 \\
\left|\bar{A}_{1} \cap \bar{A}_{2} \cap \bar{A}_{3}\right|=136-(55+45+36)+(6+3+1)=10
\end{array}
$$