How do I calculate the number of permutations of the list $(6, 6 ,5, 4)$? I have the list $l = (6, 6, 5, 4)$ and want to how to calculate the possible number of permutations.
By using brute force I know that there are 12 possible permutations:
$$\{(6, 5, 6, 4),
 (6, 6, 5, 4),
 (5, 6, 6, 4),
 (6, 4, 5, 6),
 (6, 5, 4, 6),
 (4, 6, 6, 5),
 (4, 5, 6, 6),
 (4, 6, 5, 6),
 (6, 4, 6, 5),
 (6, 6, 4, 5),
 (5, 4, 6, 6),
 (5, 6, 4, 6)\}$$
But how would I calculate this?
I know we talk about permutation as order matters also I know that repetition is allowed (at least for $x = 6$).

Imagine there are two different $6$'s, say $6_a$ and $6_b$. Then there would be $4!=24$ permutations. Now let the two $6$'s be the same, so $(6_a,7,5,6_b)=(6_b,7,5,6_a).$ This halves the number of permutations, giving the answer of $24/2=12$.
