In this paper we show that the Euler number of the compactified Jacobian J̄C of a rational curve C with locally planar singularities is equal to the multiplicity of the (δ-constant stratum in the base of a semi-universal deformation of C. The number e(J̄C) is the multiplicity assigned by Beauville to C in his proof of the formula, proposed by Yau and Zaslow, for the number of rational curves on a K3 surface X. We prove that e(J̄C) also coincides with the multiplicity of the normalisation map of C in the moduli space of stable maps to X.