8. Given $a_{k}$ as the number of integer terms in $\log _{2} k, \log _{3} k, \cdots, \log _{2018} k$. Then $\sum_{k=1}^{2018} a_{k}=$ $\qquad$
8.4102 .

Let $b_{m}$ be the number of integer terms in $\log _{m} 1, \log _{m} 2, \cdots, \log _{m} 2018$.
Then, $\sum_{k=1}^{2018} a_{k}=\sum_{m=2}^{2018} b_{m}$.
Notice that, $\log _{m} t$ is an integer if and only if $t$ is a power of $m$.
\[
\begin{array}{l}
\text { Then } b_{2}=11, b_{3}=7, b_{4}=6, b_{5}=b_{6}=5, \\
b_{7}=b_{8}=\cdots=b_{12}=4, \\
b_{13}=b_{14}=\cdots=b_{44}=3, \\
b_{45}=b_{46}=\cdots=b_{2018}=2 . \\
\text { Hence } \sum_{m=2}^{2018} b_{m} \\
=11+7+6+5 \times 2+4 \times 6+3 \times 32+2 \times 1974 \\
=4102 .
\end{array}
\]

Therefore, $\sum_{k=1}^{2018} a_{k}=4102$.