Combinations of coins in stacks I've come across this kind of problem multiple times and haven't been able to come up with an easy way to calculating the combinations.
Imagine you have n coins and m possible places to build stacks, how many ways are there to arrange the coins. Assuming building a stack using all coins in different places counts as a separate combination. It's not m^n because putting a coin in stack 1 then 2, is the same as 2 then 1.
A follow up question I have is, what if the stacks have a maximum height limit k.
and for example you have 10 coins, 4 positions and a height limit of 5. Each of the four stacks can only be filled to a height of 5.
 A: The answer to the first question is $$m(m+1)(m+2)\cdots(m+n-1).$$ Imagine placing the coins one at a time. The first coin can go in $m$ places. The second coin can go in any of $m+1$ places: on the bottom of any of the $m$ stacks, or on top of the first coin. In general, the $i^{th}$ coin can be placed in $m+i-1$ places; on the bottom of any of the $m$ stacks, or just above any of the $i-1$ previously placed coins. 
Suppose that each stack must have less than $k$ coins (note that you asked about $k$ or less; I make this change to make the answer look nicer). Then you can determine the number of ways to place the coins using the principle of inclusion exclusion. Here, I will use the notation $m^{\overline n}$ to denote $m(m+1)(m+2)\cdots(m+n-1)$. The answer is now
$$
\sum_{i=0}^m(-1)^i\binom{m}i\binom{n}{ki}(ki)!\,m^{\overline{n-ki}}
$$
Brief explanation; take all $m^{\overline n}$ arrangement, then for each stack, subtract the arrangement where that stack has $k$ or more coins. You choose the $k$ coins on the bottom in $\binom{n}k$ ways, order them in $k!$ ways, then arrange the rest of the coins in $m^{\overline{n-k}}$ ways. However, the arrangements with two stacks with $k$ or more coins were doubly subtracted, so they must be added back in. Then you correct for the arrangements with three bad stacks, then four, etc. 
