7. The integer solutions $(x, y)$ of the indeterminate equation $x^{2}+y^{2}=x y+2 x+2 y$ are in total groups.

The integer solutions $(x, y)$ of the indeterminate equation $x^{2}+y^{2}=x y+2 x+2 y$ are in total groups.
7.6 .

Rewrite the given equation as
$$
\begin{array}{l}
x^{2}-x(2+y)+y^{2}-2 y=0 \\
\Rightarrow \Delta=(2+y)^{2}-4\left(y^{2}-2 y\right)=-3 y^{2}+12 y+4 \\
\quad=-3(y-2)^{2}+16 \geqslant 0 \\
\Rightarrow|y-2| \leqslant \frac{4}{\sqrt{3}}<3 .
\end{array}
$$

Since $y$ is an integer, thus, $y=0,1,2,3,4$.
Upon calculation, only when $y=0,2,4$, $x$ is an integer, and we obtain
$$
\begin{aligned}
(x, y)= & (0,0),(2,0),(0,2),(4,2), \\
& (2,4),(4,4) .
\end{aligned}
$$