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.
The following solution uses a generating function. Readers not familiar with generating functions can find several resources in the answers to this question: How can I learn about generating functions?
There are $4^6$ possible outcomes when rolling six four-sided dice, all of which we assume are equally likely. We want to count the number of arrangements in which the sum is less than or equal to $14$. This is the number of solutions in integers to $$x_1+x_2+x_3+x_4+x_5+x_6 \le 14$$ sunbject to $1 \le x_i \le 4$ for $i=1,2,3,4,5,6$. Equivalently, we want the number of integer solutions to $$x_1+x_2+x_3+x_4+x_5+x_6+x_7 = 14 \tag{1}$$ where $0 \le x_7$. The generating function for the number of solutions is $$\begin{align} f(x) &= (x+x^2+x^3+x^4)^6 \cdot (1+x+x^2+ \dots) \\ &= x^6 \left( \frac{1-x^4}{1-x} \right)^6 \cdot \frac{1}{1-x} \tag{2} \\ &= x^6 \; (1-x^4)^6 \; (1-x)^{-7} \\ &= x^6 \; (1 -6x^4+15x^8+O(x^{12})) \; \sum_{i=0}^{\infty} \binom{7+i-1}{i} \tag{3} x^i \end{align}$$ From $(3)$ we can see that the coefficient of $x^{14}$ in $f(x)$ is $$[x^{14}]f(x) = \binom{7+8-1}{8} - 6 \binom{7+4-1}{4} + 15 = 1758$$ so the number of solutions to $(1)$ is $1758$, and the probability of rolling a sum of $14$ or less is $$\frac{1758}{4^6}$$ Notes:
$(2)$ Summing geometric series (twice).
$(3)$ Applying the Binomial Theorem, first for a positive exponent and then for a negative exponent.