An electromagnetic beam may carry billions of billions of photons each second. This high number of photons describes the numerous individual energy packets that travel along the beam. A higher emission rate of photons corresponds with a higher energy emission rate, so you can calculate the number of photons in a beam from its power rating. Another factor, the beam's frequency, also determines the beam's power rating; you can take that into account using the wave's speed and wavelength.

Multiply the speed of light, which is 3 x 10^8 meters per second, by 6.63 x 10^34, which is the ratio between a photon's energy and the beam's frequency: (3 x 10^8) x (6.63 x 10^34) = 1.989 x 10^25.

Divide this answer by the wavelength of the beam. For this example, imagine a beam with a wavelength of 700 x 10^9 meters: (1.989 x 10^25) / (700 x 10^9) = 2.841 x 10^19.

Divide the beam's power, measured in watts or joules per second, by this answer. If, for instance, the beam works at 160W: 160 / (2.841 x 10^19) = 5.6318 x 10^20. This is the number of photons that the beam carries each second.

Multiply this emission rate by the length of time time for which the beam runs. Over the course of, for instance, 15 seconds: (5.6318 x 10^20) x 15 = 8.45 x 10^21. This is the total number of photons that the beam carries.
References
 Photo Credit Jupiterimages/Photos.com/Getty Images