Let $P(x)=x^{2}-1$. How many distinct real solutions does the following equation have:
$$
\underbrace{P(P(\ldots(P}_{2004}(x)) \ldots))=0? \quad[20 \text { points }]
$$


Let's think step by step and output the final answer within \boxed{}.
user