If $f\colon\mathbb{R}\to\mathbb{R}$ is a function such that
$$(f(x))^2=x^2$$
for all $x$ , then
1) The number of such functions are?
2) How many of them are continuous?
I can see 4 functions:
$y=x$
$y=-x$
$y=|x|$
$y=-|x|$
and they are continuous.
So I get
$1)$ $4$
and
$2)$ $4$
But the answer provided is
1) infinite
2) 4
Any help?