Suppose you want the probability of rolling exactly $5$ of a kind in $9$ normal dice. There are $6$ ways to choose the number on the set, $\binom 95$ to choose the dice which show that number, and $5^4$ ways to choose the results of the other dice, giving a probability of $\frac{6\binom 95 5^4}{6^9}$.
(Here $\binom nr={}^n\mathrm C_r$ is the binomial coefficient.)
Unfortunately it's not that simple in general. What goes wrong if you try the same approach for $4$ of a kind? It looks like there should be $6\binom 945^5$ rolls which work, but here it's possible that the "other" $5$ dice not in the set will give you another set of $4$. If this happens you've counted the same roll twice: a set of $2$s on dice $1,3,4,7$ with the other dice showing $3,5,3,3,3$ is the same as a set of $3$s on dice $2,6,8,9$ with the rest showing $2,2,2,5,2$. So you need to subtract off combinations with two sets of $4$.
In general you need the inclusion-exclusion formula, and you have to keep going until you hit the maximum number of sets you can fit in. So a general formula for the number of ways to make a set of $k$ from $n$ dice with $r$ sides would be:
$$\sum_{i=1}^{\min(r,\lfloor n/k\rfloor)}(-1)^i\frac{n!}{k!^i(n-ik)!}\binom ri(r-i)^{n-ki},$$
and then you divide by $r^k$ to get the probability.
(Here we use the convention that if $r-i=n-ki=0$ then $(r-i)^{n-ki}=1$.)
The $i$th term in the above formula corresponds to counting the number of ways with $i$ sets, not worrying about overcounting (because later terms fix the overcounting). So there are $\binom ri$ ways to choose the numbers on the $i$ sets, $\binom nk$ ways to choose which dice correspond to the lowest numbered set, $\binom{n-k}k$ for the second, and so on (the product of those terms comes out as $\frac{n!}{k!^i(n-ik)!}$), and finally $(r-i)^{n-ki}=1$ possible rolls of the leftover dice, if any.
Best Answer
Here are two ways to think of it.
First choose the number on the first die (6 options). Next, choose which other die has the same number (3 options). Finally, choose the number on the other two dice (5 options). This gives $6\times 3\times 5=90$.
First choose two numbers to be rolled: there are $\binom 62=15$ ways to do this. Then choose which two dice show the higher number: there are $\binom 42=6$ ways to do this. This gives $15\times 6=90$.