6. If there exist a real number $a$ and a positive integer $n$ such that $f(x)=\cos 2 x-a \sin x$ has exactly 2022 zeros in $(0, n \pi)$, then the number of positive integers $n$ that satisfy this condition is $\qquad$.
Solve
$f(x)=\cos 2 x-a \sin x=1-2 \sin ^{2} x-a \sin x=0 \Rightarrow 2 \sin ^{2} x+a \sin x-1=0$, let $t=\sin x$, the equation becomes $2 t^{2}+a t-1=0$, since $\Delta=a^{2}+8>0$, and $t_{1} t_{2}=-\frac{1}{2}$, then the equation $2 t^{2}+a t-1=0$ has at least one root within the interval $[-1,1]$. When $t_{1}=1, t_{2}=-\frac{1}{2}$, corresponding to $\sin x$ in the interval $(0,2 \pi)$ there are three roots $\frac{\pi}{2}, \frac{7 \pi}{6}, \frac{11 \pi}{6}$, at this time $n=2 \times \frac{2022}{3}=1348$;
When $t_{1}=-1, t_{2}=\frac{1}{2}$, corresponding to $\sin x$ in the interval $(0,2 \pi)$ there are three roots $\frac{\pi}{6}, \frac{5 \pi}{6}, \frac{3 \pi}{2}$,
at this time $n=2 \times \frac{2022}{3}=1348$;
When $t_{1}>1,-1<t_{2}<0$, corresponding to $\sin x$ in the interval $(0,2 \pi)$ there are two roots in $(\pi, 2 \pi)$, at this time $n=2 \times \frac{2022}{2}=2022$ or $n=2 \times \frac{2022}{2}+1=2023$;
When $t_{1}<-1,0<t_{2}<1$, corresponding to $\sin x$ in the interval $(0,2 \pi)$ there are two roots in $(0, \pi)$, at this time $n=2 \times \frac{2022}{2}-1=2021$ or $n=2 \times \frac{2022}{2}=2022$;
When $-1<t_{1}<0,0<t_{2}<1$, corresponding to $\sin x$ in the interval $(0,2 \pi)$ there are two roots in $(0, \pi)$, two roots in $(\pi, 2 \pi)$, at this time $n=2 \times \frac{2020}{4}+1=1011$.
In summary, there are 5 positive integer values of $n$ that satisfy the conditions.