1. Given the function $f: \mathbf{N} \rightarrow \mathbf{N}$ defined as follows:
$$
f(x)=\left\{\begin{array}{ll}
\frac{x}{2}, & x \text { is even; } \\
\frac{x+7}{2}, & x \text { is odd. }
\end{array}\right.
$$

Then the number of elements in the set $A=\{x \in \mathbf{N} \mid f(f(f(x)))=x\}$ is
- 1.8.

On one hand, when $x \in \{0,1, \cdots, 7\}$, it is calculated that $f(x) \in \{0,1, \cdots, 7\}$,
and it can be verified that $\{0,1, \cdots, 7\} \subseteq A$.
On the other hand, when $x \geqslant 8$,
$$
\frac{x}{2}<x \text{, and } \frac{x+7}{2}<\frac{2 x}{2}<x \text{. }
$$

Then $f(f(f(x)))<8$, which does not hold.
Therefore, $A=\{0,1, \cdots, 7\}$, with a total of 8 elements.