I had a hard time wrapping my head around this for a while myself, but I think the best way to look at it is this. Imagine you have some simple set like $\{a,a,a,b\}$, so that you know how many distinct permutations there are: $\{aaab, aaba, abaa, baaa\}$ thus 4. We can easily use the sticker method mentioned to see that we have:
$\{a_1a_2a_3b,\;a_1a_3a_2b,\;a_2a_1a_3b,\;a_2a_3a_1b,\;a_3a_1a_2b,\;a_3a_2a_1b \} $ thus 6 permutations/distinct permutation, that is 6 permutations per distinct permutation we wouldn't be able to distinguish if we removed the stickers.
Thus, $4 \;\text{distinct permutations} \times 6 \; (\text{permutations}\,/\,\text{distinct permutation}) = 24 \;\text{permutations}$, i.e. the number of permutations you get by distinguishing each of the objects in your set.
This is all well and good, but usually we want to work the other way around, that is, we know that we have 24 permutations and we know that for each distinct permutation there are 6 permutations. But this is easy, in our example we have: $24\;\text{permutations}\;/\;(6\;\text{permutations}\,/ \,\text{distinct permutation})=4\;\text{distinct permutations}$.
So in the general case, you just take $n!$ permutations and divide by $r!$ permutations per distinct permutation (for $r$ repeated things) and you get $\frac{n!}{r!}=c$ distinct permutations.
Now, when there are more than one type of indistinguishable object, then the only thing that changes is the way you calculate the number of permutations per distinct permutation. Suppose our example above changes to $\{aaabb\}$. Now there are $3!\times2!=12$ permutations per distinct permutation, so there are $5!\,/\,(3!\times2!)=10$ distinct permutations. In general when there are $n_1$ indistinguishable objects of type $1$, $n_2$ indistinguishable objects of type $2$, ... , $n_k$ indistinguishable objects of type $k$, you now have $n_1!n_2!...n_k!$ as the number of permutations per distinct permutation, so that $c=\frac{n!}{(n_1!n_2!\,\times \text{ ... }\times \,n_k!)}$ is the number of distinct permutations.