<s>[INST] Finding the number of non-neg integer solutions? How would I find the number of non negative integer solutions to this problem?
$$x_1 + x_2 + x_3 + x_4 = 12$$ if $0 \leq x_1 \leq 2$.
 [/INST] $$x_1 + x_2 + x_3 + x_4 = 12, 0 \leq x_1 \leq 2$$ 
According to http://oeis.org/wiki/User:Adi_Dani_/Restricted_compositions_of_natural_numbers
there is derived formula
$${\binom{m}{k}}_{s}=\sum_{i=0}^{m}(-1)^{i}\binom{m}{i}\binom{m+k-si-1}{m-1}\,$$
for number of solutions of $$x_0+x_1 + x_2 +...+ x_{m-1} =k,0\leq x_i\leq s-1$$
in our case $k=12,s=3,m=4$
$${\binom{4}{12}}_{3}=\sum_{i=0}^{4}(-1)^{i}\binom{4}{i}\binom{15-3i}{3}=$$
$$=\binom{4}{0}\binom{15}{3}-\binom{4}{1}\binom{12}{3}+\binom{4}{2}\binom{9}{3}-\binom{4}{3}\binom{6}{3}+\binom{4}{4}\binom{3}{3}=$$
$$=\binom{15}{3}-4\binom{12}{3}+6\binom{9}{3}-4\binom{6}{3}+\binom{3}{3}$$
</s>