Is the "number of photons" of a system a Lorentz invariant?
Alice prepares an electromagnetic field in a state with a sharp number of photons $\hat{N}|n\rangle=n|n\rangle$ where $\hat{N}$ is the number operator. Alice is boosted with respect to Bob. In Bob's reference frame the field is in state $\hat{U}(\Lambda)|n\rangle$. The question asks if a measurement of the number of photons for Bob's state gives the sharp answer $n$. In other words, is it true that $\hat{N}\hat{U}(\Lambda)|n\rangle=n\hat{U}(\Lambda)|n\rangle$? Bob will get the sharp result $n$ if the boost operator commutes with the number operator. We just need to show that the commutator $[\hat{U}(\Lambda),\hat{N}]_{-}=0$.
The number operator for photons of helicity $\lambda$ is, \begin{equation} \hat{N_{\lambda}}=\int \frac{d^{3}p}{2\omega}\hat{\eta}_{p\lambda}\hat{\eta}^{\dagger}_{p\lambda} \end{equation} where $\hat{\eta}_{p\lambda},\hat{\eta}^{\dagger}_{p\lambda}$ are emission and absorption operators respectively for a photon of momentum $p$ and helicity $\lambda$ (the notation for emission and absorption operators is from Dirac's monograph "Lectures on Quantum Field Theory"). We also have $\omega = p^{0}$ in the Lorentz invariant measure.
Single photon states transform as, \begin{equation} \hat{U}(\Lambda)|p,\lambda\rangle=e^{-i\theta(p,\Lambda)}|\Lambda p,\lambda\rangle \end{equation} where $\theta(p,\Lambda)$ is the Wigner angle. Creating a single particle state from the vacuum $|S\rangle$ by $|p,\lambda\rangle=\hat{\eta}_{p\lambda}|S\rangle$ implies that the emission operators transform like states, \begin{equation} \hat{U}(\Lambda)\hat{\eta}_{p\lambda}=e^{-i\theta(p,\Lambda)}\hat{\eta}_{\Lambda p\lambda} \ . \end{equation} Taking the Hermitian conjugate, using unitarity, and replacing $\Lambda$ by $\Lambda^{-1}$, \begin{eqnarray} \hat{\eta}^{\dagger}_{p\lambda}\hat{U}^{\dagger}(\Lambda)&=& e^{i\theta(p,\Lambda)}\hat{\eta}^{\dagger}_{\Lambda p\lambda}\\ \hat{\eta}^{\dagger}_{p\lambda}\hat{U}(\Lambda^{-1})&=& e^{i\theta(p,\Lambda)}\hat{\eta}^{\dagger}_{\Lambda p\lambda}\\ \hat{\eta}^{\dagger}_{p\lambda}\hat{U}(\Lambda)&=& e^{i\theta(p,\Lambda^{-1})}\hat{\eta}^{\dagger}_{\Lambda^{-1} p\lambda} \ . \end{eqnarray} Now evaluate the commutator, \begin{eqnarray} [\hat{U}(\Lambda),\hat{N}_{\lambda}]_{-}&=& \int \frac{d^{3}p}{2\omega}\hat{U}(\Lambda)\hat{\eta}_{p\lambda}\hat{\eta}^{\dagger}_{p\lambda}- \int \frac{d^{3}p}{2\omega}\hat{\eta}_{p\lambda}\hat{\eta}^{\dagger}_{p\lambda}\hat{U}(\Lambda)\\ &=&\int \frac{d^{3}p}{2\omega}e^{-i\theta(p,\Lambda)}\hat{\eta}_{\Lambda p\lambda}\hat{\eta}^{\dagger}_{p\lambda}- \int \frac{d^{3}p}{2\omega}\hat{\eta}_{p\lambda}e^{i\theta(p,\Lambda^{-1})}\hat{\eta}^{\dagger}_{\Lambda^{-1} p\lambda} \ . \end{eqnarray} Make a change of variable in the second integral, $p'=\Lambda^{-1}p$. \begin{equation} [\hat{U}(\Lambda),\hat{N}_{\lambda}]_{-}= \int \frac{d^{3}p}{2\omega}e^{-i\theta(p,\Lambda)}\hat{\eta}_{\Lambda p\lambda}\hat{\eta}^{\dagger}_{p\lambda}- \int \frac{d^{3}p'}{2\omega'}\hat{\eta}_{\Lambda p'\lambda}e^{i\theta(\Lambda p',\Lambda^{-1})}\hat{\eta}^{\dagger}_{p'\lambda} \end{equation} The Wigner angle $\theta(p,\Lambda)$ corresponds to a rotation matrix $R(p,\Lambda)=H^{-1}_{\Lambda p}\Lambda H_{p}$ where $H_{p}$ is the standard boost. Now, \begin{equation} R(\Lambda p,\Lambda^{-1})=H^{-1}_{\Lambda^{-1}\Lambda p}\Lambda^{-1}H_{\Lambda p}=H^{-1}_{p}\Lambda^{-1}H_{\Lambda p}= (H^{-1}_{\Lambda p}\Lambda H_{p})^{-1}=(R(p,\Lambda))^{-1} \end{equation} so that the Wigner angle $\theta(\Lambda p,\Lambda^{-1})$ is $-\theta(p,\Lambda)$. Upon putting this result into the last integral the commutator vanishes $[\hat{U}(\Lambda),\hat{N}_{\lambda}]_{-}=0$ and so Bob's electromagnetic field also has the same sharp number $n$ of photons as Alice's field.
Edit: Explanation of why the invariant measure appears in the number operator
The method of induced representations, which is used to get the response of the single particle states to a Lorentz boost (second equation in main text), is simplest if one chooses a Lorentz invariant measure so that the resolution of unity for the single particle states is, \begin{equation} \sum_{\lambda=\pm 1}\int \frac{d^{3}p}{2\omega}|p,\lambda\rangle\langle p,\lambda|=1 \ . \end{equation} This choice implies that the commutator for the emission and absorption operators is, \begin{equation} [\hat{\eta}^{\dagger}_{p\lambda},\hat{\eta}_{p'\lambda'}]_{-}= \langle p,\lambda|p',\lambda'\rangle= 2\omega\delta_{\lambda,\lambda'}\delta^{3}(p-p') \ . \end{equation} In turn, this implies that the normal-ordered Hamiltonian for the free electromagnetic field is, \begin{equation} \hat{H}=\frac{1}{2}\int d^{3}p(\hat{\eta}_{p\lambda=-1}\hat{\eta}^{\dagger}_{p\lambda=-1}+\hat{\eta}_{-p\lambda=+1}\hat{\eta}^{\dagger}_{-p\lambda=+1}) \ . \end{equation} Now create $n$ photons from the vacuum with a state, \begin{equation} |\Psi\rangle=(\hat{\eta}_{p\lambda})^{n}|S\rangle \end{equation} and demand that the number operator $\hat{N}_{\lambda}$ measures the sharp result $n$ on this state. This implies that the Lorentz invariant measure must be used in the definition of the number operator (first equation in main text). So, one sees that there are no assumptions here, just a choice of the invariant measure (instead of a quasi-invariant measure) to make the method of induced representations used to get the irreps of the Poincare group for massless particles as simple as possible.