  Graphs embedded into surfaces have many important applications, in
particular, in combinatorics, geometry, and physics. For example, ribbon graphs
and their counting is of great interest in string theory and quantum field
theory (QFT). Recently, Koch, Ramgoolam, and Wen [Nuclear Phys.\,B {\bf 870}
(2013), 530--581] gave a refined formula for counting ribbon graphs and
discussed its applications to several physics problems. An important factor in
this formula is the number of surface-kernel epimorphisms from a co-compact
Fuchsian group to a cyclic group. The aim of this paper is to give an explicit
and practical formula for the number of such epimorphisms. As a consequence, we
obtain an `equivalent' form of the famous Harvey's theorem on the cyclic groups
of automorphisms of compact Riemann surfaces. Our main tool is an explicit
formula for the number of solutions of restricted linear congruence recently
proved by Bibak et al. using properties of Ramanujan sums and of the finite
Fourier transform of arithmetic functions.
