For my introduction to quantum physics course we are using the book "University Physics volume 3", availabe here, in the linked chapter in the first paragraph of the "Using the wave function" heading, the following is stated
The energy of an individual photon depends only on the frequency of light, $\epsilon_{photon} = hf$, so $|E|^2$ is proportional to the number of photons
$|E|$ here refers to the energy density of a light wave at a specific point in space and time.
I cannot find any context which explains why the second statement follows from the first and it appears that we are just expected to take this at face value. I am not satisfied just accepting that this there supposedly exists some reasoning that takes us from
The energy of an individual photon depends only on the frequency of light, $\epsilon_{photon} = hf$
to
$|E|^2$ is proportional to the number of photons
since I believe my understanding of this second statement will be greatly improved if I can understand how it follows from the primer.
So that is what I am asking how and through what reasoning does the fact that "The energy of an individual photon depends only on the frequency of light, $\epsilon_{photon} = hf$" lead to the conclusion that "$|E|^2$ is proportional to the number of photons"?