In 2D case, the rotation matrices are specified with $R$, conditioned on $R^TR = 1$. This condition is equivalent to say: $$ q_i q_j =\begin{cases}1&i=j\\0&i\ne j \end{cases},$$ which contributes 3 constraints for different $(i, j)$ pairs: $(1, 1) \text{ and } (1, 2) \text{ and } (2, 2)$.
As in 3D case, the rotation matrices with the same form provide 6 constraints for different $(i, j)$ pairs.
My question is:
For rotation matrices manipulated in n-dimensional, is there a general formula for counting the number of constraints they provide? Perhaps using combinatorics, i.e. k-permutations and combinations $$\binom{n}k$$
$\frac{n(n+1)}{2}$ is your friend.