2. If $\left|\log \frac{a}{\pi}\right|<2$, then the number of $a$ for which the function $y=\sin (x+a)+\cos (x-a)(x \in \mathbf{R})$ is an even function is $\qquad$.
2.10.
$$
\begin{aligned}
\because-2 & <\log \frac{\alpha}{\pi}<2, \therefore \frac{1}{\pi}<\alpha<\pi^{3} . \\
f(x)= & \sin (x+\alpha)+\cos (x+\alpha) \\
& =\sqrt{2} \sin \left(x+\alpha+\frac{\pi}{4}\right) .
\end{aligned}
$$
Since $f(x)$ is an even function,
$$
\therefore \sin \left(\frac{\pi}{4}+\alpha+x\right)=\sin \left(-x+\alpha+\frac{\pi}{4}\right) \text {, }
$$

i.e., $\alpha=k \pi+\frac{\pi}{4}, k \in \mathbf{Z}$. Therefore, $\frac{1}{\pi}<k \pi+\frac{\pi}{4}<\pi^{3}$. Thus, $\frac{1}{\pi^{2}}-\frac{1}{4}<k<\pi^{2}-\frac{1}{4}$,
Hence $0 \leqslant k \leqslant 9, k \in \mathbf{Z}$.