Example 5 In coin tossing, if Z represents heads and F represents tails, then the sequence of coin tosses is represented by a string composed of Z and F. We can count the number of occurrences of heads followed by tails (ZF), heads followed by heads (ZZ)...... For example, the sequence ZZFFZZZZFZZFFFF is the result of 15 coin tosses, which includes 5 ZZ, 3 ZF, 2 FZ, and 4 FF. How many sequences of 15 coin tosses have exactly 2 ZZ, 3 ZF, 4 FZ, and 5 FF?
(4th American Invitational Mathematics Examination (AIME))
Solution: The sequences that meet the requirements have the following two possible forms:
(1) Starting with F: $F \cdots F Z \cdots Z F \cdots F Z \cdots Z$;
(2) Starting with Z: $\mathrm{Z} \cdots \mathrm{ZF} \cdots \mathrm{FZ} \cdots \mathrm{ZF} \cdots \mathrm{F}$.
Since the sequence is required to have exactly 3 $\mathrm{ZF}$, if the sequence belongs to (2), it should have the form
$$
\text { Z } \cdots \underline{Z F} \cdots F Z \cdots Z F \cdots F Z \cdots Z F \cdots F \text {. }
$$

which contains only 2 $\mathrm{FZ}$, failing to meet the requirement of 4 $\mathrm{FZ}$. Therefore, the sequence that meets the requirements can only be of form (1).

Since the sequence has exactly 4 $\mathrm{FZ}$, when considering the sequence with exactly two ZZ, it can be divided into the following two categories: $\qquad$ ZZZ $\qquad$
$\qquad$
$\qquad$ Z, $\qquad$ ZZ $\qquad$ ZZ $\qquad$ Z $\qquad$ Z
and the different positions of $\mathrm{Z}$, with the spaces filled with $\mathrm{F}$.
Let the number of $\mathrm{F}$ in each space be $x_{1}$, $x_{2}$, $x_{3}$, $x_{4}$, then $x_{1}+x_{2}+x_{3}+x_{4}=9$ has $\mathrm{C}_{8}^{3}=56$ positive integer solutions.

On the other hand, for (1), the position of ZZZ has 4 possibilities, and for (2), the arrangement of $\mathrm{ZZ}, \mathrm{ZZ}, \mathrm{Z}, \mathrm{Z}$ has 6 possibilities, so the arrangement of $\mathrm{Z}$ has 10 possibilities.
Therefore, the number of sequences that meet the requirements is
$$
10 \times 56=560 \text { (sequences) }
$$