A generating function of the number of homomorphisms from a surface   group into a finite group
  A generating function of the number of homomorphisms from the fundamental group of a compact oriented or non-orientable surface without boundary into a finite group is obtained in terms of an integral over a real group algebra. We calculate the number of homomorphisms using the decomposition of the group algebra into irreducible factors. This gives a new proof of the classical formulas of Frobenius, Schur, and Mednykh. 
Motohico Mulase and Josephine T. Yu