Constrained stars and bars. I have been racking my brain to understand the solutions of constrained stars and bars problems like:
$a+b+c+d = 19$;  $a,b,c,d \in \{0,1,2,3,4,5,6,7\}$
Finding the total number of solutions is really simple $\dbinom{22}{3}$. 
What to do after that? I want to understand the entire procedure step by step. 
Please do not mark it as a duplicate of this.
Reasons: 
The accepted answer's trick doesn't always work. 
Another person (the answer with two upvotes) has just listed out the binomial coefficients and I can't even remotely understand what he has tried to do. 
The second answer isn't my cup of tea. 
 A: Since you're familiar with the other topic you linked, let's use that as a reference.  Using the trick from the accepted answer from the other problem, assigning $a_2=7-a,b_2=7-b,$ etc., the problem can be reduced to $a_2+b_2+c_2+d_2=9$ with similar restrictions.  Unlike with the other topic, stars and bars alone is not good enough here.  It is easier to compute how many configurations of this simplified problem are forbidden.
Without restrictions, $a_2+b_2+c_2+d_2=9$ has $\binom{12}3$ solutions.  To count how many solutions our restriction forbids, we choose one of our variables and overload it.  So let's say we give $a_2$ an initial value of $8$.  We then have $1$ item left to distribute amongst our $4$ urns.  So there are $4$ solutions forbidden because $a_2$ is too high.  The same is true for each of the other $3$ variables.  So the solution is $\binom{12}3-4(4)$.
We do not have to use the above simplification though.  Again, from the other topic, you may notice an answer involving the Principle of Inclusion-Exclusion.  Like you said, without restrictions, we have $\binom{22}3$ solutions.  If we choose one of our $4$ variables and overload it, placing $8$ items in one urn, we have $11$ items left to distribute among our $4$ urns.  So initially, we have an answer of $\binom{22}3-\binom41\binom{14}3$.
But we've subtracted cases twice.  Two variables can overload together.  We compensate by adding these cases back in.  We choose $2$ urns and give each $8$ items.  This now leaves $3$ items to distribute amongst $4$ urns, which has $\binom63$ solutions.  Since $3$ variables cannot overload at once, our final solution is $\binom{22}3-\binom41\binom{14}3+\binom42\binom63$.
I have taken the step to verify through WolframAlpha that both of these values equal $204$.
A: Here's another method which applies generally to many such problems. You have the problem equivalent to searching for coefficient of $x^{19}$ in expansion of $(1+x+x^2 ... x^7)^4$
Each power of $x$ in each of the $4$ factors represents value of particular variable ( say, $a$) and power of $x$ in each term of  expansion represents sum of value of all four variables. Note that in each term of expansion, some power of $x$ must come from each of $4$ factors.
We can rewrite this series as:
$$\begin{align}
 (1+x+x^2 + ... x^7)^{4}  &=  \left(\frac{1-x^8}{1-x}\right)^4 \\
 &= (1-x^8)^4(1-x)^{-4} \\
 &= \left(\binom{4}{0}-\binom{4}{1}x^8 + \binom{4}{2}x^{16} ...\right) \left(1-x\right)^{-4}
\end{align}$$
Thus for $x^{19}$ we only need coefficients of $x^{19}$, $x^{11}$ and $x^{3}$ from second factor, ie,$(1-x)^{-4}$. Now coefficient of $x^{r}$ in $(1-x)^{-n}$ is $\binom{n+r-1}{r}$, so we have the following answer:
$$\binom{4}{0} \binom{22}{3}-\binom{4}{1} \binom{14}{3}+\binom{4}{2} \binom{6}{3}$$
Which matches with Mike's answer found using Principal of Inclusion Exclusion.
