What is the probability that the sum of 6 four-sided dice is less than or equal to 14? The solution given is shown below.
My question is how did they count the numerator like that?
What is the explanation for it please?
$$\begin{align}
\frac{C_6^{14}-C_1^6\times C_6^{10}+C_2^6 \times C_6^6}{4^6}&=\frac{3003-6\times 210+15\times 1}{4^6}\\
&= \frac{1758}{4^6}\\
&= \frac{879}{2048}
\end{align}$$
I understand  the denominator namely because each of the four sided dice has four choices and six of them so, all possible outcomes will be $4^6$.
I believe that the 4-sided dice here has 1, 2, 3, 4 printed on its faces.
Any help is appreciated.

(I'm assuming you're familiar with Stars-and-Bars. If not, see true blue anil's solution which deals with that part of it.)
Consider finding the sum of 6 positive integers that is at most $14$, which is equivalent to 7 non-negative integers that sum to exactly $14-6=8$ (where the last variable is the dummy variable for the remainder). By Stars-and-bars, there are ${14 \choose 6 }$ ways of doing so.
Let $A_i$ be the event that the $i$th integer is 5 or more.
We're interested in $ | \cup A_i |$, which is the complement to "each is at most 4".
Notice that since $ 4 + 4 + 4 + 1 + 1 + 1 = 15 > 14$, hence at most 2 dice can show 5 or more. So $|A_i \cap A_j \cap A_k| = 0 $.
Thus, by PIE, $ | \cup A_i | = \sum |A_i| - \sum |A_i \cap A_j|$ (since the larger terms are all 0).
By Stars-and-Bars again, $|A_i| = {14 - 4 \choose 6 } $ and $ |A_i \cap A_j | = { 14 - 4 - 4 \choose 6}$.
There are clearly $ 6 \choose 1 $ events $ A_i$ and $ {6 \choose 2 }$ events $ A_i \cap A_j$.
So $ | \cup A_i |= \sum |A_i| - \sum |A_i \cap A_j| = { 6 \choose 1 } { 10 \choose 6} - { 6 \choose 2 } { 6 \choose 6}$
Hence, the number of ways is $ {14 \choose 6} - { 6 \choose 1 } { 10 \choose 6} + { 6 \choose 2 } { 6 \choose 6}.$
