Number counts of galaxies are re-analyzed using a semi-analytic model (SAM) of galaxy formation based on the hierarchical clustering scenario. Faint galaxies in the Subaru Deep Field (SDF) and the Hubble Deep Field (HDF) are compared with our model galaxies. 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, the standard cold dark matter (CDM) universe, a flat lambda-CDM, and an open CDM. The novelty of our SAM analysis is the inclusion of selection effects arising from the cosmological dimming of surface brightness of high-z galaxies, and from the absorption of visible light by internal dust and intergalactic HI clouds. As was found in our previous work, in which the UV/optical HDF galaxies were compared with our model galaxies, we find that our SAM reproduces counts of near-IR SDF galaxies in low-density models, and that the standard CDM universe is not preferred, as suggested by other recent studies. Moreover, we find that simple prescriptions for (1) the timescale of star formation being proportional to the dynamical time scale of the formation of galactic disks, (2) the size of galactic disks being rotationally supported with the same specific angular momentum as that of surrounding dark halo, and (3) the dust optical depth being proportional to the metallicity of cold gas, cannot completely explain all of observed data. Improved prescriptions incorporating mild z-dependence for those are suggested from our SAM analysis.