Comparing the excursion set and CUSP (confluent system of peak trajectories) formalisms for the derivation of the halo mass function, we investigate the role of the mass definition in the properties of the multiplicity function of cold dark matter (CDM) haloes. We show that the density profile for haloes formed from triaxial peaks that undergo ellipsoidal collapse and virialization is such that the ratio between the mean inner density and the outer local density is essentially independent of mass. This causes that, for suited values of the spherical overdensity (SO) Δ and the linking length b, SO and FoF masses are essentially equivalent to each other and the respective multiplicity functions are essentially the same. The overdensity for haloes having undergone ellipsoidal collapse is the same as if they had formed according to the spherical top-hat model, which leads to a value of b corresponding to the usual virial overdensity, Δ_vir, equal to ∼0.2. The multiplicity function resulting from such mass definitions, expressed as a function of the top-hat height for spherical collapse, is very approximately universal in all CDM cosmologies. The reason for this is that, for such mass definitions, the top-hat density contrast for ellipsoidal collapse and virialization is close to a universal value, equal to ∼0.9 times the usual top-hat density contrast for spherical collapse.