For point-like particles, the term "degree of freedom" seems rather clear: It's the number of independent coordinate functions $q_i(t)$ that we need to specify to completely describe the system at all points in time. This number coincides with the dimension of the configuration-space. So for $N$ pointlike particles, there are $3N$ degrees of freedom.
Now for the electric and magnetic field, I need (at any point in time) 6 components for each of uncountably infinite positions $\vec{x}$. Obviously it is not meaningful to talk about infinite degrees of freedom, so my first guess would be
- to call the degrees of freedom of the electromagnetic field the number of independent functions of $t$ and $\vec{x}$ that one needs to fully specify the system (without using the maxwell equations).
Is that the right way to think about it? If so, why can we reduce the DoF from 6 to 4, making use of the potentials $\vec{A}, \Phi$? To do so, we already used Maxwell's equations. And reducing the number even more by choosing appropriate gauges (like the temporal gauge, $\Phi = 0$ also employs the gauge freedom that Maxwell's equations have given us.
So to make is short, I ask for a rigorous definition of the terminology "degree of freedom" along with the information which equations are allowed to play a role here, and which don't. Especially, introductory texts to QED mention that the field actually only has two degrees of freedom, which I can see for one classical solution with wave vector $\vec{k}$, but not in general.