In this paper we obtain an explicit formula for the number of curves in P 2 , of degree d, passing through (d(d + 3)/2 − k) generic points and having a codimension k singularity, where k is at most 7. In the past, many of these numbers were computed using techniques from algebraic geometry. In this paper we use purely topological methods to count curves. Our main tool is a classical fact from differential topology: the number of zeros of a generic smooth section of a vector bundle V over M , counted with a sign, is the Euler class of V evaluated on the fundamental class of M .