  For a finite group $G$, Frobenius found a formula for the values of the
function $\sum_{\mathrm{Irr} G} (\dim\, \pi)^{-s}$ for even integers $s$, where
$\mathrm{Irr} G$ is the set of irreducible representations of $G$. We
generalize this formula to the relative case: for a subgroup $H$, we find a
formula for the values of the function $\sum_{\mathrm{Irr} G} (\dim\, \pi)^{-s}
(\dim\, \pi ^H)^{-t}$. We apply our results to compute the E-polynomials of
Fock--Goncharov spaces and to relate the Gelfand property to the geometry of
generalized Fock--Goncharov spaces.
