Number of microstates for a simple object For the sake of argument let's say an object is made from 4 atoms where 3 atoms have 1 quanta of energy and 1 atom has two quantas of energy. Something like this:

Where a pair of curved lines represent 1 quanta.
Now if you were to find the number of microstates you can simply use the nCr formula. However, I am being told that n in this case is 8 and r is 5. The value for r makes sense because that is the number of quanta, but I don't understand why the value for n is 8. 
 A: The number of ways to arrange $q$ quanta across $N$ "compartments" (atoms, oscillators, etc.) is given by $$\Omega(N,q)=\binom{N+q-1}{q}$$ as outlined in the discussion of the Einstein solid. The $N-1$ comes from how $N$ compartments corresponds to $N-1$ partitions.
As you can see, this applies to how you are describing your system here with $q=5$ and $N=4$. Note that your image shows just $1$ of the $56$ total possible microstates. 
A: I think this question might require some more context. On the face of it, it seems like the number of microstates should simply be 4: Because energy quanta are usually "indistinguishable", specifying which of the four atoms has two quanta completely determines the state.
But the answer might differ if the energy quanta can be placed in different ways within one atom. Could you elaborate on the exact formulation of the problem?
As a note, $\begin{pmatrix} 8 \\ 5 \end{pmatrix}$ is the number of ways to put 5 energy quanta into 8 slots (presumably 2 per atom?). But this would mean that each atom has two different ways to have one energy quantum, and it would also include states where more than one atom has two quanta. I can't understand where the number 8 would come from in this situation.
Edit: The answer by Aaron Stevens is correct (assuming you are asking about the less specific macrostate, 5 quanta with no constraints), so please don't listen to me!
