2. The number of values of $n$ $\left(n \in \mathbf{N}_{+}\right)$ for which the equation $x^{2}-6 x-2^{n}=0$ has integer solutions is $\qquad$
2.1.
$x=3 \pm \sqrt{3^{2}+2^{n}}$, where $3^{2}+2^{n}$ is a perfect square. Clearly, $n \geqslant 2$.
When $n \geqslant 2$, we can assume
$$
2^{n}+3^{2}=(2 k+1)^{2}\left(k \in \mathbf{N}_{+}, k \geqslant 2\right),
$$

i.e., $2^{n-2}=(k+2)(k-1)$.
It is evident that $k-1=1, k=2, n=4$.
The number of values of $n$ that make the original equation have integer solutions is 1.