# What is the difference between $n$ (no. of photons passing a fixed point per second) and $f$ (frequency) of a photon in the formula: power = $nhf$?

As above. As far as I understand, the frequency of a wave is also the number of waves passing a fixed point per second.

You seem to have a misconception. The number of photons, $$n$$, passing a fixed point is exactly that, and is a different entity than the frequency. By definition, frequency (in general terms) is the amount of times a cycle occurs in a given interval. In photons, we refer to frequency as the amount of times it oscillates in a second, due to its wavelike nature. Its energy is described as $$E_{photon}=hf$$
However, you must take into consideration that frequency by itself can be applied to many situations. You could measure the frequency with which waves pass a given point, and call it $$f$$. However, it would NOT be the same as the frequency of oscillation of the wave (as you could have several waves, in your case photons, passing through).
Basically, whenever you are calculating power you need to know the rate at which energy is provided or consumed in a given amount of time. In your case, you wish to know how much power is provided by the n photons that pass per seconds. So $$f$$ is the frequency of the photon that gives you the energy of said photon, and $$n$$ is the amount of photons that pass per seconds (or frequency of the passage of photons, but you must we careful when using frequency twice in the same sentence, as it can lead to confusion).