<s>[INST] What is the probability of the sum of four dice being 22? Question

Four fair six-sided dice are rolled. The probability that the sum of the results being $22$ is $$\frac{X}{1296}.$$ What is the value of $X$?

My Approach
I simplified it to the equation of the form:

$x_{1}+x_{2}+x_{3}+x_{4}=22, 1\,\,\leq x_{i} \,\,\leq 6,\,\,1\,\,\leq i \,\,\leq 4 $

Solving this equation results in:
$x_{1}+x_{2}+x_{3}+x_{4}=22$
I removed restriction of $x_{i} \geq 1$ first as follows-:
$\Rightarrow x_{1}^{'}+1+x_{2}^{'}+1+x_{3}^{'}+1+x_{4}^{'}+1=22$
$\Rightarrow x_{1}^{'}+x_{2}^{'}+x_{3}^{'}+x_{4}^{'}=18$
$\Rightarrow \binom{18+4-1}{18}=1330$
Now i removed restriction for $x_{i} \leq 6$ , by calculating the number of bad cases and then subtracting it from $1330$:
calculating bad combination i.e $x_{i} \geq 7$
$\Rightarrow x_{1}^{'}+x_{2}^{'}+x_{3}^{'}+x_{4}^{'}=18$
We can distribute $7$ to $2$ of $x_{1}^{'},x_{2}^{'},x_{3}^{'},x_{4}^{'}$ i.e$\binom{4}{2}$
We can distribute $7$ to $1$ of $x_{1}^{'},x_{2}^{'},x_{3}^{'},x_{4}^{'}$ i.e$\binom{4}{1}$ and then among all others .
i.e
$$\binom{4}{1} \binom{14}{11}$$
Therefore, the number of bad combinations equals $$\binom{4}{1} \binom{14}{11}  - \binom{4}{2}$$
Therefore, the solution should be:
$$1330-\left( \binom{4}{1} \binom{14}{11} - \binom{4}{2}\right)$$
However, I am getting a negative value. What am I doing wrong?
EDIT
I am asking for my approach, because if the question is for a larger number of dice and if the sum is higher, then predicting the value of dice will not work.
 [/INST] It is the coefficient of $x^{22}$ in the expansion of the generating function $$(x^6+x^5+x^4+x^3+x^2+x^1)^4=\left(\frac{x(1-x^6)}{1-x}\right)^4$$ which is $$1\cdot{{x}^{24}}+4\cdot {{x}^{23}}+10\cdot {{x}^{22}}+20\cdot {{x}^{21}}+35\cdot {{x}^{20}}+56\cdot {{x}^{19}}+80\cdot {{x}^{18}}\\+104\cdot {{x}^{17}}+125\cdot {{x}^{16}}+140\cdot {{x}^{15}}+146\cdot {{x}^{14}}+140\cdot {{x}^{13}}+125\cdot {{x}^{12}}+104\cdot {{x}^{11}}\\+80\cdot {{x}^{10}}+56\cdot {{x}^{9}}+35\cdot {{x}^{8}}+20\cdot {{x}^{7}}+10\cdot {{x}^{6}}+4\cdot {{x}^{5}}+1\cdot{{x}^{4}}$$
so the answer is $10$.
This generalises easily to more dice or even those with different numbers of faces 
</s>