How many $G$ bundles are there over a surface? Let $G$ be a finite group, $M$ a 2-dimensional manifold. There are
$$ \#\{ (a_1,b_1,a_2,b_2,\cdots,a_g,b_g) \in G^{2g}\,|\, \Pi_i[a_i,b_i]=1\} $$
many $G$ bundles over $M$ up to isomorphism, where $g$ is the genus of $M$.
There is only one bundle if $g=0$, and $|\mbox{Conj}(G)|$ many bundles if $g=1$. However, when $g$ is larger than $1$, things get trickier.
Even the easiest case $g=2$ and $G=S_3$ is hard. Are there ways to cleverly compute the number? If not in general, can I find the answer somewhere for some $g$ and some usual groups $S_n$ (symmetric), $A_n$ (alternative), $D_n$ (dihedral)..?
 A: G-bundles are classified by $BG$. One can calculate that $[X,BG]_*=\operatorname{Hom}(\pi_1(X),G)$. Unpointed maps then correspond to $\operatorname{Hom}(\pi_1(X),G)/\sim$ where $\sim$ is the action of conjugation (in particular, you only have half the bundles you want in your genus 2 case). This agrees with your description in the surface case.
A: Computations of the size of $Hom(\pi_1(M), G)$ when $M$ is a surface and $G$ is finite were done in
M.Mulase, J.Yu, A generating function of the number of homomorphisms from a surface group into a finite group, math/0209008v1. 
In particular, they reprove a pretty formula originally due to Mednykh:
$$\frac{|\text{Hom}(\pi_1(M), G)|}{|G|} = \sum_\lambda \left( \frac{\dim V_\lambda}{|G|} \right)^{\chi(M)}$$
where the sum is taken over all isomorphism classes of irreducible complex representations of $G$ ($V_\lambda$ is a complex vector space equipped with an irreducible representation $\lambda$ of $G$) 
and $M$ is closed, connected and orientable. They also give a formula in the case of non-orientable surfaces. In particular, given $G$, once you have the table of irreducible representations of $G$, you can compute the size of the set of  homomorphisms $\pi_1(M)\to G$. Nice thing is that the dependence on the surface $M$ is rather weak: The hard part of the formula is entirely encoded in the representation theory of $G$ which you can look up in the given special case. For instance, in the case of dihedral groups $G=D_n$, see this question. If $n$ is odd and $M$ has genus $g$, we get
$$
\frac{|\text{Hom}(\pi_1(M), G)|}{2n} = 2 \left( 2n \right)^{2g-2} + \frac{n+3}{2}  n^{2g-2}
$$
