There's a nice classification of some of the basic problems in combinatorics known as the twelvefold way, and here is a table. The Wikipedia article is rather technical; if you search on Google you can find PDF files that offer more concrete examples in terms of balls being allocated to urns, etc.

I believe you want the third row, first column, which gives the answer as a sum of Stirling numbers of the second kind.