$|A=\{a : f(a)=a\}|$ can be found by counting the number of intersections of $y=f(x)$ and $y=x$.
$|B=\{b : f(f(b))=b\}|$ can be found by counting the number of intersections of $y=f(x)$ and $y=a (a\in A)$.
But how can I find $|C=\{c : f(f(c))=f(c) \}|$ ?
Draw the graph $y=f(x)$ and the line $y=x.$ At every point $P=(a,f(a))$ where these two curves meet, draw the horizontal line $y=a.$ Now count the total number of intersections of $y=f(x)$ with all of the horizontal lines.