3. The number of integers $x$ that make $x^{2}+x-2$ a perfect square is $\qquad$.

Make the above text in English, please keep the original text's line breaks and format, and output the translation result directly.
3.4 .

Let $x^{2}+x-2=y^{2}, y \in \mathbf{N}$, then $4 x^{2}+4 x-8=(2 y)^{2}$,
i.e., $(2 x-2 y+1)(2 x+2 y+1)=3^{2}$.
Therefore, we have $\left\{\begin{array}{l}2 x-2 y+1=1, \\ 2 x+2 y+1=9 ;\end{array}\left\{\begin{array}{l}2 x-2 y+1=3, \\ 2 x+2 y+1=3 ;\end{array}\right.\right.$ $\left\{\begin{array}{l}2 x-2 y+1=-3, \\ 2 x+2 y+1=-3 ;\end{array}\left\{\begin{array}{l}2 x-2 y+1=-9, \\ 2 x+2 y+1=-1 .\end{array}\right.\right.$
Solving, we get $\left\{\begin{array}{l}x=2, \\ y=2 ;\end{array}\left\{\begin{array}{l}x=1, \\ y=0 ;\end{array}\left\{\begin{array}{l}x=-2, \\ y=0 ;\end{array}\left\{\begin{array}{l}x=-3, \\ y=2 .\end{array}\right.\right.\right.\right.$ Therefore, there are 4 integers $x$ that satisfy the given conditions. Note: This problem can also be solved using the "discriminant method".