Given a representation $R$ of a group $G$ and the corresponding tensor product
$$ R \otimes R = R_1 \oplus R_2 \oplus R_3 \oplus \ldots $$
how can I compute how many quartic terms $ \mathrm{O} (R^4) \sim 1$ are linearly independent?
For example, given the adjoint $24$ of $SU(5)$, we have
$$ 24\otimes 24 = 1_s \oplus 24_s \oplus 24_a \oplus 75_s \oplus 126_a \oplus \overline{126_a} \oplus 200_s ,$$
where each representation is denoted by its dimension and the subscripts $s$ and $a$ denote symmetric and antisymmetric respectively. Naively, I would say we have 7 quartic invariants:
$$ (24\otimes 24)_{1_s} (24\otimes 24)_{1_s} + (24\otimes 24)_{24_s} (24\otimes 24)_{24_s} + (24\otimes 24)_{24_a} (24\otimes 24)_{24_a} + (24\otimes 24)_{75_s} (24\otimes 24)_{75_s} + (24\otimes 24)_{126_a} (24\otimes 24)_{126_a} + (24\otimes 24)_{\overline{126_a}} (24\otimes 24)_{\overline{126_a}} +(24\otimes 24)_{200_s} (24\otimes 24)_{200_s} ,$$
because
$$ 1_s \otimes 1_s = 1 \quad 24_s \otimes 24_s =1 \quad 75_s \otimes 75_s =1 \quad etc. $$
Nevertheless, apparently only two of them are linearly independent. How can I compute how many and which of these 7 terms are linearly independent?
EDIT: For some reason a criterion seems to be how many representations appear in the symmetric part of the tensor product $R \otimes R$, as stated here, but I have no idea why.