First, we find all $x$ such that $f(x) = 2$ by drawing the line $y = 2$ and finding the intersection points.

[asy]
import graph; size(9cm);

real lsf=0.5;

pen dps=linewidth(0.7)+fontsize(10);

defaultpen(dps); pen ds=black;

real xmin=-4.5,xmax=4.5,ymin=-0.5,ymax=4.5;

Label laxis; laxis.p=fontsize(10);

xaxis("$x$",xmin,xmax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);
yaxis("$y$",ymin,ymax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);

//draw((xmin,(-(0)-(-2)*xmin)/-2)--(-1,(-(0)-(-2)*-1)/-2),linewidth(1.2),BeginArrow(6)); //draw((-1,1)--(3,5),linewidth(1.2));

//draw((3,(-(-16)-(2)*3)/2)--(xmax,(-(-16)-(2)*xmax)/2),linewidth(1.2),EndArrow(6));

draw((-4,2)--(4,2),red);

real f(real x) { return -.5*x^2-1.5*x+2;}
draw(graph(f,-4,-2));
draw((-2,3)--(2,1));
real f(real x) { return .5*x^2-1.5x+2;}
draw(graph(f,2,4));

label("$f(x)$",(-3,5),E);

dot("$(-4,0)$", (-4,0), NW);
dot("$(-3,2)$", (-3,2), NW);
dot("$(-2,3)$", (-2,3), N);
dot("$(0,2)$", (0,2), NE);
dot("$(2,1)$", (2,1), S);
dot("$(3,2)$", (3,2), SE);
dot("$(4,4)$", (4,4), NE);

label("$y = 2$", (4,2), E);

//clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
[/asy]

Thus, $f(x) = 2$ for $x = -3$, $x = 0$, and $x = 3$.  So, if $f(f(x)) = 2$, then $f(x) = -3$ ,$f(x) = 0$, or $f(x) = 3$.

Since $f(x) \ge 0$ for all $x$ ,the equation $f(x) = -3$ has no solutions.

We see that $f(x) = 0$ for $x = -4$.

And the graphs of $y = f(x)$ and $y = 3$ intersect at $x = -2$, and once between $x = 3$ and $x = 4$ at the red dot.  This means the equation $f(x) = 3$ has two solutions.

[asy]
import graph; size(9cm);

real lsf=0.5;

pen dps=linewidth(0.7)+fontsize(10);

defaultpen(dps); pen ds=black;

real xmin=-4.5,xmax=4.5,ymin=-0.5,ymax=4.5;

Label laxis; laxis.p=fontsize(10);

xaxis("$x$",xmin,xmax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);
yaxis("$y$",ymin,ymax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);

//draw((xmin,(-(0)-(-2)*xmin)/-2)--(-1,(-(0)-(-2)*-1)/-2),linewidth(1.2),BeginArrow(6)); //draw((-1,1)--(3,5),linewidth(1.2));

//draw((3,(-(-16)-(2)*3)/2)--(xmax,(-(-16)-(2)*xmax)/2),linewidth(1.2),EndArrow(6));

draw((-4,3)--(4,3),red);

real f(real x) { return -.5*x^2-1.5*x+2;}
draw(graph(f,-4,-2));
draw((-2,3)--(2,1));
real f(real x) { return .5*x^2-1.5x+2;}
draw(graph(f,2,4));

label("$f(x)$",(-3,5),E);

dot("$(-4,0)$", (-4,0), NW);
dot("$(-3,2)$", (-3,2), NW);
dot("$(-2,3)$", (-2,3), N);
dot("$(0,2)$", (0,2), NE);
dot("$(2,1)$", (2,1), S);
dot("$(3,2)$", (3,2), SE);
dot("$(4,4)$", (4,4), NE);
dot((3.56, 3), red);

label("$y = 3$", (4,3), E);

//clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
[/asy]

Therefore, the equation $f(f(x)) = 2$ has a total of $3$ solutions.
먼저 $y = 2$ 선을 그리고 교차점을 찾아 $f(x)=2$ 가 되는 모든 $x$ 를 찾습니다.

[asy]
import graph; size(9cm);

real lsf=0.5;

펜 dps=선폭(0.7)+글꼴크기(10);

defaultpen(dps); 펜 ds=검정;

real xmin=-4.5,xmax=4.5,ymin=-0.5,ymax=4.5;

레이블 laxis; laxis.p=fontsize(10);

x축("$x$",xmin,xmax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);
yaxis("$y$",ymin,ymax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);

//draw((xmin,(-(0)-(-2)*xmin)/-2)--(-1,(-(0)-(-2)*-1)/-2),linewidth(1.2),BeginArrow(6)); //draw((-1,1)--(3,5),linewidth(1.2));

//draw((3,(-(-16)-(2)*3)/2)--(xmax,(-(-16)-(2)*xmax)/2),linewidth(1.2),EndArrow(6));

draw((-4,2)--(4,2),red);

real f(real x) { return -.5*x^2-1.5*x+2;}
draw(graph(f,-4,-2));
draw((-2,3)--(2,1));
real f(real x) { return .5*x^2-1.5x+2;}
draw(graph(f,2,4));

label("$f(x)$",(-3,5),E);

dot("$(-4,0)$", (-4,0), NW);
dot("$(-3,2)$", (-3,2), NW);
dot("$(-2,3)$", (-2,3), N);
dot("$(0,2)$", (0,2), NE);
dot("$(2,1)$", (2,1), S);
dot("$(3,2)$", (3,2), SE);
dot("$(4,4)$", (4,4), NE);

label("$y = 2$", (4,2), E);

//clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
[/asy]

따라서 $x = -3$, $x = 0$, $x = 3$의 경우 $f(x) = 2$입니다. 따라서 $f(f(x)) = 2$이면 $f(x) = -3$, $f(x) = 0$ 또는 $f(x) = 3$입니다.

모든 $x$에 대해 $f(x)는 \ge 0$이므로, $f(x) = -3$ 방정식은 해가 없습니다.

우리는 $x = -4$에 대해 $f(x) = 0$임을 알 수 있습니다.

그리고 $y = f(x)$와 $y = 3$의 그래프는 $x = -2$에서 교차하고, 빨간색 점으로 표시된 $x = 3$과 $x = 4$ 사이에서 한 번 교차합니다. 즉, $f(x) = 3$ 방정식에는 두 개의 해가 있습니다.

[asy]
import graph; size(9cm);

real lsf=0.5;

펜 dps=선폭(0.7)+글꼴크기(10);

defaultpen(dps); 펜 ds=검정;

real xmin=-4.5,xmax=4.5,ymin=-0.5,ymax=4.5;

레이블 laxis; laxis.p=fontsize(10);

x축("$x$",xmin,xmax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);
yaxis("$y$",ymin,ymax,defaultpen+black,Ticks(laxis,Step=1.0,Size=2,OmitTick(0)),Arrows(6),above=true);

//draw((xmin,(-(0)-(-2)*xmin)/-2)--(-1,(-(0)-(-2)*-1)/-2),linewidth(1.2),BeginArrow(6)); //draw((-1,1)--(3,5),linewidth(1.2));

//draw((3,(-(-16)-(2)*3)/2)--(xmax,(-(-16)-(2)*xmax)/2),linewidth(1.2),EndArrow(6));

draw((-4,3)--(4,3),red);

real f(real x) { return -.5*x^2-1.5*x+2;}
draw(graph(f,-4,-2));
draw((-2,3)--(2,1));
real f(real x) { return .5*x^2-1.5x+2;}
draw(graph(f,2,4));

label("$f(x)$",(-3,5),E);

dot("$(-4,0)$", (-4,0), NW);
dot("$(-3,2)$", (-3,2), NW);
dot("$(-2,3)$", (-2,3), N);
dot("$(0,2)$", (0,2), NE);
dot("$(2,1)$", (2,1), S);
dot("$(3,2)$", (3,2), SE);
dot("$(4,4)$", (4,4), NE);
dot((3.56, 3), red);

label("$y = 3$", (4,3), E);

//clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
[/asy]

따라서 $f(f(x)) = 2$ 방정식에는 총 3$ 개의 해가 있습니다.