8. Let $\left\{a_{n}\right\}$ be an arithmetic sequence with all terms being integers, the first term $a_{1}=2019$, and for any positive integer $n$, there always exists a positive integer $m$ such that $a_{1}+a_{2}+\cdots+a_{n}=a_{n}$. The number of such sequences $\left\{a_{n}\right\}$ is $\qquad$ .
Answer: 5.
Solution: Let the common difference of $\left\{a_{n}\right\}$ be $d$. From the condition, we know $a_{1}+a_{2}=a_{k}$ (where $k$ is some positive integer), then
$$
2 a_{1}+d=a_{1}+(k-1) d,
$$

which means $(k-2) d=a_{1}$, so it must be that $k \neq 2$, and $d=\frac{a_{1}}{k-2}$. Thus, we have
$$
a_{n}=a_{1}+(n-1) d=a_{1}+\frac{n-1}{k-2} a_{1},
$$

and for any positive integer $n$,
$$
\begin{aligned}
a_{1}+a_{2}+\cdots+a_{n} & =a_{1} n+\frac{n(n-1)}{2} d=a_{1}+(n-1) a_{1}+\frac{n(n-1)}{2} d \\
= & a_{1}+\left((n-1)(k-2)+\frac{n(n-1)}{2}\right) d,
\end{aligned}
$$

which is indeed a term of $\left\{a_{n}\right\}$.
Therefore, we only need to consider the number of positive integers $k$ such that $k-2 \mid a_{1}$. Note that 2019 is the product of two primes 3 and 673, so $k-2$ can take the values $-1,1,3,673,2019$, corresponding to 5 arithmetic sequences that satisfy the condition.