The constant function is obviously also a solution, that is, f(x)= 1, 2 or 3. Three solutions.
These four are trivial solutions. Let's find an extraordinary solution.
Let f(x)=y≠x, then f(y)=f(f(x))=f(x)=y,
The rest of the z, f(z)≠y first, otherwise it becomes a constant function.
Secondly, if f(z)=x, then f (x) = f (f (z) = f (z) = x, which contradicts f (x) = y ≠ X 。
So there must be f (z) = z
So the nontrivial solution has two fixed points and one change point.
There are three fixed points, which can be mapped to one of the two fixed points, so the nontrivial solution * * * is 2×3.
So there are 1+3+6= 10 solution functions f (x) * * that satisfy the function equation.