From: joel on
I've just figured out what I'm looking for, it's the multinomial coefficients. Now all i need to do is apply it.