As one anon already pointed out, the answer lies in the definition of a coherent state
https://en.wikipedia.org/wiki/Coherent_statesBasically, you construct a superposition of many photons of many different frequencies, and do so in such a way that removing any particular photon does not change the dynamics of the superposition (in the sense that they evolve to the same final state at a later time - this is the definition of a coherent state). The coherent state has a different frequency than any particular photon it is "composed" of, and this frequency is the one that is relevant to the macroscopic electric and magnetic fields.
In effect, this means that an electromagnetic wave of a particular energy and frequency is not necessarily composed of a definite number of photons with exactly the same frequency and identical energies. This is the case because in a coherent state, the total number of photons is uncertain.