An electromagnetic wave carries energy, and the amount of energy depends on the number of photons it transports each second. Scientists describe light and other electromagnetic energy in terms of photons when they treat it as a series of discrete particles. The amount of energy per photon depends on the wave's wavelength and frequency. A wave with a higher frequency, or a longer wavelength, transmits more energy with each photon.
Multiply the the Planck constant, 6.63 x 10^-34, by the wave's speed. Assuming the wave's speed to be the speed of light in a vacuum, which is 3 x 10^8 meters per second: 6.63 x 10^-34 x 3 x 10^8 = 1.99 x 10^-25.
Divide the result by the wave's wavelength. If you're calculating, for instance, for a wave with wavelength of 650 x 10^-9 meters: (1.99 x 10^-25) / (650 x 10^-9) = 3.06 x 10^-19
Divide the power of the wave by this answer. If, for instance, you are calculating all the photons emitted by a 100-watt bulb: 100 / (3.06 x 10^-19) = 3.27 x 10^20. This is the number of photons that the light carries each second.