  Number counts of galaxies are re-analyzed using a semi-analytic model (SAM)
of galaxy formation based on the hierarchical clustering scenario. We have
determined the astrophysical parameters in the SAM that reproduce observations
of nearby galaxies, and used them to predict the number counts and redshifts of
faint galaxies for three cosmological models for (1) the standard cold dark
matter (CDM) universe, (2) a low-density flat universe with nonzero
cosmological constant, and (3) a low-density open universe with zero
cosmological constant. The novelty of our SAM analysis is the inclusion of
selection effects arising from the cosmological dimming of surface brightness
of high-redshift galaxies, and also from the absorption of visible light by
internal dust and intergalactic \ion{H}{1} clouds. Contrary to previous SAM
analyses which do not take into account such selection effects, we find, from
comparison with observed counts and redshifts of faint galaxies in the Hubble
Deep Field (HDF), that the standard CDM universe is {\it not} preferred, and a
low-density universe either with or without cosmological constant is favorable,
as suggested by other recent studies. Moreover, we find that a simple
prescription for the time scale of star formation (SF), being proportional to
the dynamical time scale of the formation of the galactic disk, is unable to
reproduce the observed number- redshift relation for HDF galaxies, and that the
SF time scale should be nearly independent of redshift, as suggested by other
SAM analyses for the formation of quasars and the evolution of damped
Ly-$\alpha$ systems.
