Example 6 Find the number of solutions to the equation
$$
|| \cdots|||x|-1|-2| \cdots|-2011|=2011
$$

The number of solutions. ${ }^{[4]}$
【Analysis】Remove the absolute value symbols from outside to inside, step by step.
From the original equation, we get
$$
|| \cdots|||x|-1|-2| \cdots|-2010|=0
$$

or ||$\cdots|||x|-1|-2| \cdots|-2010|=4002$.
For equation (1), we have
$$
\begin{array}{l}
|| \cdots|||x|-1|-2| \cdots|-2009|=2010 \\
\Rightarrow|| \cdots|||x|-1|-2| \cdots|-2008| \\
\quad=2009+2010 \\
\Rightarrow|x|=1+2+\cdots+2010=2011 \times 1005 .
\end{array}
$$

Similarly, for equation (2), we have
$$
|x|=1+2+\cdots+2010+4022=2011 \times 1007 .
$$

Therefore, $x= \pm 2011 \times 1005$ or
$$
x= \pm 2011 \times 1007 \text {, }
$$

there are four solutions in total.