Star counts as an indicator of galactic structure and quasar evolution