11. The number of integers $n$ that satisfy $\left(n^{2}-n-1\right)^{n+2}=1$ is.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly. 

Note: The provided text is already in English, so no translation is needed. However, if the task is to translate the problem statement itself, the translation would be:

11. The number of integers $n$ that satisfy $\left(n^{2}-n-1\right)^{n+2}=1$ is.
11.4 .

From $n+2=0, n^{2}-n-1 \neq 0$, we get $n=-2$;
From $n^{2}-n-1=1$, we get $n=-1, n=2$;
From $n^{2}-n-1=-1$ and $n+2$ is even, we get $n=0$.
Therefore, $n=-1,-2,0,2$ for a total of 4.