Constraints on the evolution of peculiar red giants. II. Masses and space densities.