I'm confused about the number of degrees of freedom in General Relatity. There are two ways to count it. However, they are contradictory. For simplicity, we consider vacuum solution.
First, $G_{\mu\nu}=0$ gives $10$ equations and $g_{\mu\nu}$ have $10$ degrees of freedom(d.o.f). While $\nabla^\mu G_{\mu\nu}=0$ are $4$ identities, only $6$ of original $10$ ($G_{\mu\nu}=0$) equations are independent. So now there are $6$ independent equations and $10$ degrees of freedom. Because there is coordinate transformation freedom, $4$ of $10$ are gauge freedom. Given $4$ coordinate conditions, only $6$ are physical degrees of freedom and there are $6$ independent equations, so it is well-defined.
Second, if we consider Hamiltonian formalism, we need ADM decomposition where $N$ and $N^i$ are Lagrangian mutipliers and can be given arbitrarily. So there are $6$ degrees of freedom which are $g_{ij}$. While $N$ and $N^i$ give $4$ constraints, only $6-4=2$ are physical degrees of freedom.
Therefore there is contradiction about the number of d.o.f between Einstein Field Equations which give $6$ and Hamiltionian formalism which gives $2$.
So I have following questions:
1)How to reconcile above contradiction? How much physical degrees of freedom are in GR?
2) There is a saying that massless spin-2 particle have two d.o.f. Is this d.o.f same as the physical d.o.f in $g_{\mu\nu}$?
3) We always say that because of the freedom of coordiante transformation (or gauge freedom) ,$x^\mu \xrightarrow{} x^\mu+\xi^\mu(x)$ , we can decrease $4$ d.o.g in $g_{\mu\nu}$. However, in electrodynamics, $A^\mu$ also has gauge freedom $A^\mu \xrightarrow{} A^\mu + \partial^\mu \Lambda(x) $ which can decrease $2$ d.o.f in $A^\mu$. I know how to derive these. I just want to know why in GR $4$ functions freedom $\xi^\mu(x)$ can decrease 4 d.o.f , while in electrodynamics $1$ function freedom $\Lambda(x)$ can decrease $2$ d.o.f .
Remark: I heard someone saying that in first case, $g_{\mu\nu}$ have $10$ d.o.f, gauge freedom decrease $4$ d.o.f, and Bianchi's identities $\nabla^\mu G_{\mu\nu}=0$ are $4$ constraints which decrease $4$ d.o.f of $g_{\mu\nu}$ , so $10-4-4=2$ physical d.o.f are left. I think it is not right, because identity is different from constriant. Identity decreases the number of idependent equations, while constriant decreases the number of d.o.f. Because given any $g_{\mu\nu}$, $\nabla^\mu G_{\mu\nu}=0$ are always right, $\nabla^\mu G_{\mu\nu}=0$ will not have any constraint on $g_{\mu\nu}$.