My book states that it depends upon "The number of photons of same frequency or wavelength ABSORBED or EMITTED" From what I understood, if many hydrogen atoms within the discharge tube EMIT the same wavelength, then, on passing the radiation through a prism, these waves will overlap on the photographic plate (Because all of them will get deflected to the same extent by the prism). Hence increasing the intensity. Is my understanding correct? Secondly, how can the number of photons of the same wavelength ABSORBED create any difference in the intensity of spectral lines? As far as I know, absorption only results in black lines on the bright background corresponding to the absorbed wavelengths.
We are not sure of the complete context. In simple words, the intensity is proportional to the number of photons impinging on the detector per unit area. This also implies that we can measure the power (in Watts) of the radiation, which is proportional to the number of photons. One can say that a laser is a high intensity source because a lot of photons impinge on a small area.
A high intensity spectral (absorption or emission) indicates that transition occurred in a larger number of atoms i.e. that electronic transition occurred in a large population of atoms.
A more rigorous definition is provided by IUPAC:
spectral radiant intensity, I The radiation intensity, I at wavelength λ per unit wavelength interval. The SI unit is W m−1 sr−1, but a commonly used unit is W nm−1 sr−1
Note that sr symbol indicates the solid angle measured in steradians.
The answer "The number of photons of same frequency or wavelength ABSORBED or EMITTED" from your book is a general way of saying when spectral lines are brighter (or darker). Your understanding of this general mechanism is (I think) mostly correct.
From what I understand, the differences in intensity of different spectral lines, however, is related to two (possibly more) things:
1) If a photon hits an atom (or molecule) and that photon has the exact energy needed to excite that atom does not necessarily means that the photon WILL be absorbed. There is an absorption probability associated with each energy transition. For example, one transition might have a 80% probability of absorption, while another has 0% (because the transition is forbidden).
2) Another factor that influences intensity is related to what state the system is in. For example, if two transitions, lets call them 0->2 and 1->2 both have a 100% probability of adsorption, but all the atoms/molecules are in state 0, then the 1->2 transition will not happen. That is, it will be dark/low intensity.
I hope this is helpful.