Let G be a group and E an idempotent matrix with entries in the group algebra CG. In this paper, we consider the embedding of CG into the von Neumann algebra N G and use the center-valued trace on the latter, in order to obtain some information about the coefficients of the Hattori-Stallings rank of E. Our results generalize the inequalities obtained previously by Kaplansky [11], Passi, Passmann, Luthar and Alexander [1,10,12], while providing at the same time a unified and coherent presentation of these, via the notion of moments that are associated with E.