Galaxy counts as a cosmological test