Parameter spaces for curves on surfaces and enumeration of rational curves