How many outcomes are there when you roll 4 dice? My initial reaction is to say that the answer is $6^4$, since 4 dice can have 6 outcomes. In my train of thought, the first dice can have 6 outcomes, same as the second, third and fourth, thus $6*6*6*6$ would seem fitting. However, my professor claims that answer is wrong because it overcounts, and says that the answer is actually $9 \choose 4$.
Can someone help me understand how it overcounts and why the answer is $9 \choose 4$?
 A: Your answer of $6^4$ would be correct if we were considering ordered outcomes, where it matters what each die shows in order. In this scenario, you'd treat $1,1,1,2$ as different from $1,2,1,1$ for instance.
Your professor is considering unordered outcomes, which would treat both of the examples above as $3$ ones plus $1$ two.
One way to count the unordered outcomes is a stars and bars approach - Wikipedia. Here you imagine your 4 dice as 'stars' and your $6$ individual outcomes (numbers $1\dots6$) as $5$ 'bars'. An outcome looks something like:
$$\text{ones}\left|\vphantom\int\right.
\text{twos}\left|\vphantom\int\right.
\text{threes}\left|\vphantom\int\right.
\text{fours}\left|\vphantom\int\right.
\text{fives}\left|\vphantom\int\right.
\text{sixes}$$
The combination $1,2,1,1$ (3 ones, 1 two) would look like:
$$***\left|\vphantom\int\right.
*\left|\vphantom\int\right.
\left|\vphantom\int\right.
\left|\vphantom\int\right.
\left|\vphantom\int\right.
$$
The combination $2,4,4,5$ (1 two, 2 fours, 1 five) would look like:
$$\left|\vphantom\int\right.
*\left|\vphantom\int\right.
\left|\vphantom\int\right.
**\left|\vphantom\int\right.
*\left|\vphantom\int\right.
$$
All together there are 9 objects (4 stars, 5 bars), and any combination amounts to picking 5 of the locations for the bars - $\dbinom95$ possibilities, or picking 4 locations for the stars - $\dbinom94$ possibilities. Happily, they give the same result.
A: I think the answer of @Frentos should be accepted. Here I will just give an alternative.

*

*Suppose all $4$ dice are different, then you have $6\choose 4$ possibilities.

*Suppose $2$ dice are the same and the other two different, then you have $6\cdot{ 5\choose 3}$ possibilities.

*Suppose $3$ dice are the same, the you have $6\cdot 5$ possibilities.

*Suppose all dice are the same, then you have $6$ possibilities.

*Suppose there are two numbers appearing two times each, then you have $6\cdot5$ possibilities.

Summing up the numbers above gives $9\choose 4$.
Obviously, this approach is very time consuming when dealing with a bigger amount of dice.
