Find the number of functions $f$ that map the set $\{1,2, 3,4\}$ into itself such that the range of the function $f(x)$ is the same as the range of the function $f(f(x))$.

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