Can the photon frequency and the photon number be measured simultaneously?
The question arises the in context of the Compton scattering (see here for the original discussion), where one would need to measure the frequency shift of a single photon. Although measuring a single photon (or a very low photon number) might be possible using a photon counter, I doubt that it can be done simultaneously with measuring its frequency.
Could you formulate it in basic quantum-mechanical terms, e.g., is as non-commutativity of two operators: "frequency operator" and the number of particles? I would also appreciate a relevant discussion of what is possible experimentally in this respect.
Remark
I would like to note that single-mode approach doesn't help. I.e., if we start with a single mode, then the operators of the energy of the field and the number of particles are
$$\hat{H}=\hbar\omega b^\dagger b,\hat{n}=b^\dagger b.$$
However, we cannot measure the frequency by measuring the energy and the particle number and then dividing them one by the other, since these are given by the same operator. Thus, in practice measuring energy in such single-mode case means measuring the particle number and multiplying it by the known frequency.
One could approach the problem in this spirit by assuming that we have a field with potentially many modes, and we want to measure how many photons are in each of them: $$\hat{H}=\sum_\omega\hbar\omega b_\omega^\dagger b_\omega,\hat{n}_\omega=b_\omega^\dagger b_\omega.$$ (We are ultimately interested in the limit of one photon.)