8. Let the arithmetic sequence $\left\{a_{n}\right\}$ have all terms as integers, with 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_{m}$. The number of such sequences $\left\{a_{n}\right\}$ is $\qquad$
Let $\{a_n\}$ be an arithmetic sequence with a common difference $d$, and according to the problem, $d \in \mathbf{Z}$.
There exists a positive integer $k$ such that $a_1 + a_2 = a_k \Rightarrow 2a_1 + d = a_1 + (k-1)d \Rightarrow d = \frac{a_1}{k-2}$.
Thus, $a_1 + a_2 + \cdots + a_n = n a_1 + \frac{n(n-1)}{2} d = a_1 + (n-1) a_1 + \frac{n(n-1)}{2} d$ $= a_1 + (n-1)(k-2) d + \frac{n(n-1)}{2} d = a_1 + \left[(n-1)(k-2) + \frac{n(n-1)}{2}\right] d$, which implies there exists a positive integer $m = (n-1)(k-2) + \frac{n(n-1)}{2} + 1$ that satisfies the condition.
Therefore, we only need $(k-2) \mid a_1 = 2019 = 3 \times 673 \Rightarrow k-2 = -1, 1, 3, 673, 2019$, i.e., $d = -2019, 1, 3, 673, 2019$. Hence, there are 5 sequences $\{a_n\}$ that satisfy the condition.