How many ways are there to put 6 balls in 3 boxes if the balls are not distinguishable but the boxes are?
Look at solution #10 here:
Anybody who is interested in this type of question can visit this page which gives very extensive details about the restrictions and a variety of formulas to solve them. Some of them are quite advanced, requiring knowledge of "partitions", "Stirling numbers of the second kind!"........etc.