Setting $n = p + q$, the total number of generators of $\operatorname{so}(p, q)$ or $\operatorname{su}(p, q)$ is respectively $n(n - 1) /2$ and $n^2 - 1$.
But what is the number of non-compact generators of $\operatorname{so}(p,q)$ and $\operatorname{su}(p,q)$?
I found the answer in a book of Robert Gilmore - Lie Groups, Lie Algebras, asnd some of Their Applications - DOVER EDITIONS - pages 412/414
$$\operatorname{so}(p, q)$$
Number of compact generators : $\frac{p(p-1) +q(q-1)}{2}$
Number of Noncompact generators : $pq$
$$\operatorname{su}(p, q)$$
Number of compact generators : $p^2 + q^2 - 1$
Number of Noncompact generators : $2 pq$