This can be reformulated as finding the number of integer solutions to $x_1 + x_2 + \cdots + x_n = \frac{n(n+1)}{2} - n = \frac{n(n-1)}{2}$ such that $0 \leq x_i \leq n-1$ for each $x_i$.
My first instinct was to use generating functions and attempt to determine the coefficient attached to $x^{\frac{n(n-1)}{2}}$ in the expansion of $(1 + x + \cdots + x^{n-1})^n = \left(\frac{1-x^n}{1-x}\right)^n$ but wasn’t sure how to proceed.
Alternatively, inclusion-exclusion seems like it could get really messy here, and I’m unsure if I’m overlooking something such as the parity of $n$ that’ll be an important factor in solving. Any input on how to tackle this would be greatly appreciated!