Example 10 Let $S$ be the unit circle in the complex plane (i.e., the set of complex numbers with modulus 1), and let $f$ be a mapping from $S$ to $S$. For any $z \in S$, define $f^{(1)}(z)=f(z), f^{(2)}(z)=f(f(z)), \cdots, f^{(k)}(z)=$
(4th China Mathematical Olympiad)
If $c \in S$ and a natural number $n$ exist such that $f^{(1)}(c) \neq c, f^{(2)}(c) \neq c, \cdots, f^{(n-1)}(c) \neq c, f^{(n)}(c)=$ $c$, then $c$ is called an $n-$periodic point of $f$.
Let $m$ be a natural number greater than 1, and define $f$ as follows: $f(z)=z^{m}(z \in S)$.
Calculate the number of 1989-periodic points of $f$.
When $f^{(n)}(c)=c$, it is known that $c$ is an $n$-fixed point of $f$. Clearly, an $n$-periodic point must be an $n$-fixed point. Conversely, if $c$ is an $n$-fixed point, there must be a smallest positive integer $m$ such that $c$ is an $m$-periodic point. In this case, $m \mid n$ must hold; otherwise, let $n = k m + r (0 < r < m)$, then $c = f^{(n)}(c) = f^{(r)}(c)$, which contradicts the minimality of $m$.
From this, we get: If the number of $n$-fixed points and $n$-periodic points of $f$ are denoted as $F_{n}$ and $P_{n}$, respectively, then
$$
P_{n}=F_{n}-\sum_{\substack{d \neq n \\ d \neq n}} P_{d}.
$$

For the function $f$, it is easy to prove by induction that $f^{(k)}(z)=z^{m^{k}}$, so from $f^{(k)}(z)=z$ we know $F_{n}=m^{k}-1$. Since $1989=3^{2} \cdot 13 \cdot 17$, its (less than 1989) factors are 11 in total: $1,3,9,13,17,39,51,117$, $153,221,663$, hence we can deduce (or use the principle of inclusion-exclusion to calculate):
$$
\begin{array}{c}
P_{1}=F_{1}=m-1, P_{3}=F_{3}-P_{1}=m^{3}-m, \\
P_{9}=F_{9}-P_{1}-P_{2}=m^{9}-m^{3}, P_{13}=m^{13}-m, \\
P_{17}=m^{17}-m, P_{39}=m^{39}-m^{13}-m^{3}+m, \\
P_{51}=m^{51}-m^{17}-m^{3}+m, P_{117}=m^{117}-m^{39}-m^{9}+m^{3}, \\
P_{153}=m^{153}-m^{51}-m^{9}+m^{3} ; P_{21}=m^{221}-m^{17}-m^{13}+m, \\
P_{663}=m^{663}-m^{221}-m^{51}-m^{39}+m^{17}+m^{13}+m^{3}. \\
\text{Finally, } P_{1989}=F_{1999}-\sum_{\substack{d \neq 1999 \\ d \neq 1999}} P_{d} \\
=m^{1999}-m^{663}-m^{153}-m^{117}+m^{51}+m^{39}+m^{9}-m^{3}.
\end{array}
$$

From the above solution, we have