Reduced classes and curve counting on surfaces I: theory