The ESO nearby Abell cluster survey. VII. Galaxy density profiles of rich clusters of galaxies