If a beam of red light and a beam of blue light have exactly the same energy, which beam contains the greater number of photons?

E = hc/lambda where both h and c are constants and lambda is the wavelength. Red light is about 700 nm wavelength and blue light is about 450 nm ( or close to that). That formula will give you the energy of one photon. You can infer from that which beam has the greater number of photons.