Q:

How many ways there are to add up 7 numbers to sum of 180?

Farmer has 7 pigs and 180 potatoes. How many combinations of distributing those 180 potatoes there are? Order does not matter. Each pig can get from zero to 180 potatoes, but all 7 pigs must get exactly 180 potatoes (no less). How to tackle this problem generally: How many combinations of K sets exist which sum up exactly to N?
I would like to apply the solution in the field of election math for calculation of probability of election reversal. Philosophizing what would happen if invalid ballots (potatoes) were valid and if they were distributed among competing candidates (pigs). 
Here is something similar but without the condition that all potatoes must be eaten.
https://stackoverflow.com/questions/4588429/number-of-ways-to-add-up-to-a-sum-s-with-n-numbers
Moreover, it has been solved with recursive function, not an elegant formula. 

A:

Loooking at your problem other way around: you have $k$ pigs and you are drawing with replacement $n$ of them, giving a potato to the pig each time it is drawn. So the distribution of potatoes divided between the pigs follows a multinomial distribution with equal probabilities for each pig.
As about number of combinations of such sets, this is a stars-and-bars problem about combinations in multisets, so there are
$$ \left(\!\!\binom{n+1}{k-1}\!\!\right)=\binom{n+k-1}{n} $$
such combinations.
The classical stars-and-bars problem can be describes as following: you have $n$ stars to be divided into $k$ multisets. This can be thought as adding to the stars $k-1$ additional bars that mark boundaries of the groups and then randomly shuffling all the objects, e.g.
$$ \star \star \star \star || \star | \star \star | $$
now you just need to count the number of re-arrangements of $n+k-1$ objects.

