The multiplicity function of a local ring