2. Given $f(x)=|1-2 x|, x \in[0,1]$, then the number of solutions to the equation
$$
f(f(f(x)))=\frac{1}{2} x
$$

is . $\qquad$
2. Let $y=f(x), z=f(y), w=f(z)$, analyze the change of $y, z, w$ when $x$ changes from 0 to 1:

Since “$\rightarrow$” indicates a linear change, and the change is within the non-negative real number range, the graph of $w=f(f(f(x)))$ is as shown in the figure.
Obviously, the graph of $w=f(f(f(x)))$ intersects the line $w=\frac{x}{2}$ at 8 points, i.e., the number of solutions is 8.