<s>[INST] Number of integral solutions $x_1 + x_2 + x_3 = 10$ $x_1 + x_2 + x_3  = 10, \ \ 0 \leq x_1 \leq 10 , \ 0 \leq x_2 \leq 6 , \ 0 \leq x_3 \leq 2 $

$[x^{10}]  (1 + x^1 + x^2 + ... + x^{10})(1 + x^1 + x^2 + ... + x^{6})(1 + x + x^2)$
$[x^{10}] \Large (\frac{1 - x^{11}}{1-x})(\frac{1 - x^{7}}{1-x})(\frac{1 - x^{3}}{1-x})$
$[x^{10}] \Large( \frac{(1 - x^7 - x^{11} + x^{18}) (1-x^3)}{(1-x)^3})$ 
$[x^{10}] \Large( \frac{1 - x^3 - x^7 + x^{10}}{(1-x)^3})$ 
$[x^{10}] (1 - x^3 - x^7 + x^{10})(1-x)^{-3}$
how to proceed further?  
 [/INST] Using 
$$(1-x)^{-n}=1+nx+\frac{n(n+1)}{2}x^2+\frac{n(n+1)(n+2)}{6}x^3+\dotsb+\frac{n(n+1)\dotsb(n+k-1)}{k!}x^k+\dotsb$$
We get
$$(1-x)^{-3}=1+3x+\frac{12}{2}x^2+\frac{60}{6}x^3+\dotsb +\frac{3\cdot 4\cdot \dotsb (3+k-1)}{k!}x^k+\dotsb$$
Now you want coefficient of $x^{10}$ in $(1 - x^3 - x^7 + x^{10})\color{blue}{(1-x)^{-3}}$. This can be obtained by collecting coefficient of $x^{10}$ obtained by multiplying the various terms. What I mean by that is we will obtain $x^{10}$ by multiplying $1$ with $\color{blue}{x^{10}}$, $x^3$ with $\color{blue}{x^7}$, $x^7$ with $\color{blue}{x^3}$ and finally $x^{10}$ with $\color{blue}{1}$. Thus the coefficient of $x^{10}$ obtained will be
\begin{align*}
&=(1)\color{blue}{\left(\frac{3\cdot 4 \dotsb 12}{10!}\right)}+(-1)\color{blue}{\left(\frac{3\cdot 4 \dotsb 9}{7!}\right)}+(-1)\color{blue}{\left(\frac{3\cdot 4 \cdot 5}{3!}\right)}+(1)\color{blue}{(1)}\\
&=66-36-10+1\\
&=21.
\end{align*}
</s>