$5 . n$ is a positive integer not exceeding 1996. If there is a 0 such that $(\sin \theta+i \cos \theta)^{n}=\sin n \theta+i \cos n 0$ holds, then the number of $n$ values satisfying the above condition is $\qquad$.
5. 498 .
$$
\begin{array}{l}
\because(\sin \theta+i \cos \theta)^{n}=[i(\cos \theta-i \sin \theta)]^{n} \\
\quad=i^{n}(\cos n \theta-\sin n \theta)=i^{n-1}(\sin n \theta+i \cos n \theta), \\
\text { and }(\sin \theta+i \cos \theta)^{n}=\sin n \theta+i \cos n \theta, \\
\therefore i^{n-1}(\sin n \theta+i \cos n \theta)=\sin n \theta+i \cos n \theta. \\
\because \sin \theta+i \cos \theta \neq 0 . \\
\therefore i^{n-1}=1, n=4k+1 .
\end{array}
$$

That is, all positive integers that leave a remainder of 1 when divided by 1996 meet the requirement, and there are $\left[\frac{1996-1}{4}\right]=498$ such numbers.