The way I see it, in both spontaneous and stimulated emission, one atom being de-excited would result in one photon being produced. So if we excite $10^{23}$ atoms, only $10^{23}$ photons would be produced when they de-excite. How can there be a net output of photons then? How is it that lasers can be sustained for a long time at high intensities?
Also, my notes state that when a system is in equilibrium, the rate at which atoms are excited is equal to the rate at which the atoms are de-excited. What is meant by equilibrium in this context?