  By pairwise gluing of edges of a polygon, one produces two-dimensional
surfaces with handles and boundaries. In this paper, we count the number ${\cal
N}_{g,L}(n_1, n_2, ..., n_L)$ of different ways to produce a surface of given
genus $g$ with $L$ polygonal boundaries with given numbers of edges $n_1, n_2,
>..., n_L$. Using combinatorial relations between graphs on real
two-dimensional surfaces, we derive recursive relations between ${\cal
N}_{g,L}$. We show that Harer-Zagier numbers appear as a particular case of
${\cal N}_{g,L}$ and derive a new explicit expression for them.
