2. Given that $f(x)$ is a periodic function on $\mathbf{R}$ with the smallest positive period of 2, and when $0 \leqslant x<2$, $f(x)=x^{3}-x$, then the number of intersections of the graph of the function $f(x)$ with the $x$-axis in the interval $[0,6]$ is $\qquad$ .
$f(x)=x(x+1)(x-1) \Rightarrow f(x)$ has 2 zeros in one period, so the graph of the function $f(x)$ intersects the $x$-axis 7 times in the interval $[0,6]$.