[SOLVED] Permutations of a Partition with Limits

Hi, Im considering a problem related to Partitions and Permutations. I have a set of Users S ={1,2,3...n} and require each user to demand an integer unit of proccessing from a server, where the demand by each user is limited to a max of |S-1|, and min of 0.

Hence a set of 3 users: User 1, User 2, and User 3, may demand maximum processing with a sum of 6 (since each user demands 2 units). Clearly there is only one partition for this sum (2,2,2), as imposed by our limits per user. However, when considering a lower processing sum, for example 4, there are a number of "legal" partitions, each with a number of permutations:

(2,2,0) and its 2 other permutations (0,2,2); (2,0,2)

(2,1,1) and its 2 other permutations (2,1,2); (1,1,2)

Im struggling to devise a formula that will tell me the total number of permutations for all partitions of a processing sum, for a given set size, with the stated limits. Can anyone help?