Is ignoring small characteristics, in particular $2$, acceptable?
– Will SawinJun 2 '12 at 20:10

Each curve of genus $2$ has a canonical map to $\mathbb P^1$. This gives a family of $\mathbb P^1$s, that is, a ruled surface (classified by vector bundles modulo the action of the Picard group by tensor product). So you first need to classify thoe. Then you need to find the possible divisors that consist of $6$ points on each fiber for each of those vector bundles. Alternately, you could start with the 6 ramification points on each fiber, which form a $6$-fold unramified, not necessarily connected, cover. For $p>5$ these are easy to classify.
– Will SawinJun 2 '12 at 20:14

It found also when there are singular fibres?
– camiloJun 2 '12 at 22:23

You probably want to start with the compactified moduli space $\bar{M}_2$ of curves of genus $2$. Every family will give you a map from the curve to that compactified moduli space, a 3-dimensional variety, and you can try to count those. But the map won't entirely determine the family.
– Will SawinJun 3 '12 at 4:51