Enumeration of singular algebraic curves