Two plane curves $X,Y$, defined by polynomials $f(x,y)=0$ and $g(x,y)=0$,are analytically isomorphic(at the origin). i.e., the complete local rings $k[[x,y]]/(f)$ and $k[[x,y]]/(g)$ are isomorphic.

Why $\ell(k[x,y]/(f,f_x,f_y))=\ell(k[x,y]/(g,g_x,g_y))?$ Here, $\ell(M)$=the length of $M$=the number of modules in a composition series of $M$.

Hartshorne 1.5.mensions "analytically isomorphic" and exercise 5.14. tells something about plane singularities. I can't prove and understand the above equality. How can I prove?