8. Expand the binomial $\left(\sqrt{x}+\frac{1}{2 \sqrt[4]{x}}\right)^{n}$ in descending powers of $x$. If the coefficients of the first three terms form an arithmetic sequence, then the number of terms in the expansion where the power of $x$ is an integer is $\qquad$ .
The $(r+1)$-th term of the expansion $T_{r+1}=C_{n}^{r}(\sqrt{x})^{n-r}\left(\frac{1}{2 \sqrt[4]{x}}\right)^{r}=\frac{1}{2^{r}} C_{n}^{r} x^{\frac{n-r}{2}-\frac{r}{4}}=\frac{1}{2^{r}} C_{n}^{r} x^{\frac{2 n-3 r}{4}}$, thus $a_{1}=1, a_{2}=\frac{1}{2} C_{n}^{1}=\frac{n}{2}, a_{3}=\frac{1}{4} C_{n}^{2}=\frac{n(n-1)}{8}$. From $\frac{n(n-1)}{8}+1=n^{2}-9 n+8=0 \Rightarrow n=8$ or $n=1$ (discard). Therefore, $\frac{16-3 r}{4} \in \mathbf{Z} \Rightarrow r=0,4,8$ for a total of 3 terms.