Given the spin operator for particle $j$ \begin{align} \bar{S}_{j} = \left( \bigotimes_{k=1}^{j-1} I_{k} \right) \otimes \left(\tfrac{\hbar}{2}\bar{\sigma}\right)_{j} \otimes \left( \bigotimes_{k=j+1}^{N} I_{k} \right) \end{align} how do I count the degeneracies of the total angualr momentum for all electrons together? I assume that the total angular momentum for $N$ electrons is \begin{align} J^2 = \left| \sum_{i=1}^{N}\bar{S}_{i} \right| \end{align}
Qmechanic suggests the solution $$m_{n,k}~=~ \frac{n!~(n + 1 - 2k)}{k!~ (n + 1 - k)!}. $$ from Problem counting spin statesProblem counting spin states.