HOW TO COUNT CURVES: FROM 19 CENTURY PROBLEMS TO 21 CENTURY SOLUTIONS