(4) The number of solutions to the equation $\pi^{x-1} x^{2}+\pi^{x^{2}} x-\pi^{x^{2}}=x^{2}+x-1$ is
$\qquad$ , where $\pi$ is the ratio of a circle's circumference to its diameter.
(4) 2 Hint: The original equation can be transformed into $x^{2}\left(\pi^{x-1}-1\right)+(x-1)\left(\pi^{x^{2}}-1\right)=$ 0. When $x \neq 0,1$, $x^{2}\left(\pi^{x-1}-1\right)$ and $(x-1)\left(\pi^{x^{2}}-1\right)$ have the same sign, so $x=$ 0,1. Therefore, the number of solutions is 2.