  We prove the conjectures of Yau-Zaslow and Gottsche concerning the number
curves on K3 surfaces. Specifically, let X be a K3 surface and C be a
holomorphic curve in X representing a primitive homology class. We count the
number of curves of geometric genus g with n nodes passing through g generic
points in X in the linear system |C| for any g and n satisfying C^2=2g+2n-2.
  When g=0, this coincides with the enumerative problem studied by Yau and
Zaslow who obtained a conjectural generating function for the numbers.
Recently, Gottsche has generalized their conjecture to arbitrary g in terms of
quasi-modular forms. We prove these formulas using Gromov-Witten invariants for
families, a degeneration argument, and an obstruction bundle computation. Our
methods also apply to P^2 blown up at 9 points where we show that the ordinary
Gromov-Witten invariants of genus g constrained to g points are also given in
terms of quasi-modular forms.
