<s>[INST] Counting solutions to $x_1 + x_2 + x_3 + x_4 = 12$ with at least one $x_i\ge 5$. 
Count the non-negative integral solutions of $x_1 + x_2 + x_3 + x_4 = 12$ with at least one $x_i\ge 5$.

I got really confused about that problem and really would like to know about methods to solve this.
I have tried to substitute the variables and the result for $7$ and then adding the $5$ later. I also thought about subtracting and using the pigeonhole principle.
 [/INST] We can  first get $4$ numbers adding to $7 = ^{(7+4-1)}C_{(4-1)} = 120$. As $5$ can be added to any of the $4$ numbers, multiply the answer by $4$.
Then we need to subtract duplicate arrangements -
$\{7,0,0,0\}$ arrangements that make arrangements of $\{7,5,0,0\}$ by adding $5$ are already covered in $\{2,5,0,0\}$ arrangements. So for each place of $7$, the only valid placement of $5$ is with $7$. Other $3$ are duplicates.
$S1 = 4 \times 3 = 12$
$\{6,1,0,0\}$ arrangements that make arrangements of $\{6,1,5,0\}$ by adding $5$ are already covered in $\{5,1,1,0\}$ arrangements.
$S2 = 2 \times \dfrac{4!}{2!} = 24$
$\{6,1,0,0\}$ arrangements that make arrangements of $\{6,6,0,0\}$ by adding $5$ are counted twice.
$S3 = \dfrac{1}{2} \times \dfrac{4!}{2!} = 6$
$\{5,2,0,0\}$ arrangements that make arrangements of $\{5,2,5,0\}$ by adding $5$ are counted twice.
$S4 = \dfrac{4!}{2!} = 12$
$\{5,1,1,0\}$ arrangements that make arrangements of $\{5,1,1,5\}$ by adding $5$ are counted twice.
$S5 = \dfrac{1}{2} \times \dfrac{4!}{2!} = 6$
Total valid arrangements $= 480 - (S1+S2+S3+S4+S5) = 420$.
</s>