Number of combinations of dice having different number of faces that add to $10$

The formula is a bit messy. Suppose there are $n$ dice, and the list is $f=[f_1,f_2,\dots,f_n]$. You want to count the number of integer solutions to the constrained equation $$ \begin{align} x_1+x_2+\dots+x_n &= s\\ 1\le x_i&\le f_i\hspace{2cm} \text{ for }i=1,2,\dots,n \end{align} $$ To solve this, first, count the number of solutions without the constraint $x_i\le f_i$. This can be shown to be $\binom{s-1}{n-1}$ (imagine a line of $s$ dots, and you place dividers in $n-1$ of the $s-1$ spaces between the dots). Now, use inclusion exclusion to subtract out the "bad" solutions where some $x_i > f_i$. The result is this: $$ \bbox[10px,border:solid 2px black]{ \Bbb P(\text{sum of dice }=s) = \frac1{f_1\times\dots\times f_n} \sum_{S\subseteq \{1,2,\dots,n\}} (-1)^{|S|}\binom{s-1-\sum_{i\in S}f_i}{n-1}.} $$ There are $2^n$ summands, one for each subset of $\{1,2,\dots,n\}$ (i.e. subset of the available dice). Also, whenever the upper index $s-1-\sum_{i\in S}f_i$ is negative, the binomial coefficient is defined to be zero.

For the special case where $f_1=f_2=\dots=f_n=d$, that is all of the dice have $d$ sides, this simplifies to $$ \bbox[10px,border:solid 2px black]{ \Bbb P(\text{sum of $n$ dice with $d$ sides }=s) = \frac1{d^n} \sum_{k=0}^n (-1)^{k}\binom{n}k\binom{s-1-kd}{n-1}.} $$ For example, when $f=[2,4,4,6]$ and $s=10$, you get $$ {1\over 2\cdot 4\cdot 4\cdot 6}\left[ \begin{array}{l}\binom{10-1}{4-1}\\ -\binom{10-2-1}{4-1}-\binom{10-4-1}{4-1} -\binom{10-4-1}{4-1}-\binom{10-6-1}{4-1}\\ +\binom{10-2-4-1}{4-1}+\binom{10-2-4-1}{4-1} \end{array}\right]. $$ Terms with $\sum_{i\in S}f_i>s-n$ have been omitted, since in these cases the binomial coefficient is zero.