  The mass function of galaxies and clusters of galaxies can be derived
observationally based on different types of observations. In this study we test
if these observations can be combined to a consistent picture which is also in
accord with structure formation theory. The galaxy data comprise the optical
galaxy luminosity function and the gravitational lensing signature of the
galaxies, while the galaxy cluster mass function is derived from the X-ray
luminosity distribution of the clusters. We show the results of the comparison
in the form of the mass density fraction that is contained in collapsed objects
relative to the mean matter density in the Universe. The mass density fraction
in groups and clusters of galaxies extrapolated to low masses agrees very well
with that of the galaxies: both converge at the low mass limit to a mass
fraction of about 28\% if the outer radii of the objects are taken to be
$r_{200}$. Most of the matter contained in collapsed objects is found in the
mass range $M_{200} \sim 10^{12} - 10^{14} h^{-1}_{70} M_\odot$, while a larger
amount of the cosmic matter resides outside of objects with radius $r_{200}$.
