5. The number of integer solutions $(x, y)$ for the equation $x^{2}+x y+2 y^{2}=29$ is $(\quad)$.
(A) 2
(B) 3
(C) 4
(D) infinitely many
5. C.

Transform the original equation into a quadratic equation in terms of $x$, which is $x^{2}+y x+\left(2 y^{2}-29\right)=0$.
Since this equation has integer roots, the discriminant $\Delta \geqslant 0$, and it must be a perfect square, i.e.,
$$
\Delta=y^{2}-4\left(2 y^{2}-29\right)=-7 y^{2}+116 \geqslant 0 \text {. }
$$

Solving for $y^{2} \leqslant \frac{116}{7} \approx 16.57$.
See Table 1.
Table 1
\begin{tabular}{|c|c|c|c|c|c|}
\hline$y^{2}$ & 0 & 1 & 4 & 9 & 16 \\
\hline$\Delta$ & 116 & 109 & 88 & 53 & 4 \\
\hline
\end{tabular}

Clearly, only when $y^{2}=16$, $\Delta=4$ is a perfect square, which meets the requirement.

When $y=4$, the original equation becomes $x^{2}+4 x+3=0$, at this time, $x_{1}=-1, x_{2}=-3$;

When $y=-4$, the original equation becomes $x^{2}-4 x+3=0$, at this time, $x_{3}=1, x_{4}=3$.
Therefore, the integer solutions of the original equation are
$$
(x, y)=(-1,4),(-3,4),(1,-4),(3,-4) \text {. }
$$