  In this paper we obtain an explicit formula for the number of curves in a
compact complex surface $X$ (passing through the right number of generic
points), that has up to one node and one singularity of codimension $k$,
provided the total codimension is at most $7$. We use a classical fact from
differential topology: the number of zeros of a generic smooth section of a
vector bundle $V$ over $M$, counted with signs, is the Euler class of $V$
evaluated on the fundamental class of $M$.
