Homotopy classes of loops on surfaces are more complicated than just "how many holes they pass around". The fundamental group of the genus g surface is isomorphic to $\langle a_1, b_1, \dots, a_g, b_g | [a_1, b_1] [a_2, b_2] \cdots [a_g, b_g]\rangle$, where that's a
group presentation.