Example 8 A diagonal of a 2006-gon $P$ is called good if its endpoints divide the boundary of $P$ into two parts, each containing an odd number of sides of $P$. In particular, a side of $P$ is also considered good.

Suppose $P$ is triangulated by 2003 diagonals that do not intersect in the interior of $P$. Find the maximum number of isosceles triangles in this triangulation that have two good sides. (47th IMO Problem)
Define an isosceles triangle with two good sides as a good triangle. First, consider special cases.
For a square, there is essentially only one type of division, and the number of good triangles is 2;
For a regular hexagon, there are essentially only 3 types of divisions, and the maximum number of good triangles is 3. We also notice that when the maximum value is reached, the legs of the good triangles are all sides of $P$.

For the general case, it is not difficult to find that the maximum number of good triangles in the division of a regular $2n$-sided polygon is $n$.
In fact, for any triangle $ABC$ in the division graph, the boundary of $P$ is divided into 3 segments by $A$, $B$, and $C$. The number of sides of $P$ contained in the $A-B$ segment (counting counterclockwise from $A$ to $B$) is denoted as $m(AB)$, and so on.

Since $m(AB) + m(BC) + m(CA) = 2006$, if an isosceles triangle has two good sides, then it has exactly two good sides, and these two good sides are the two legs (otherwise, all three sides would be good, which is a contradiction).

Consider any good triangle $ABC$, where $AB = AC$. If there are other good triangles on the $A-B$ segment, remove all the sides of $P$ cut by the two legs of these good triangles, and the number of sides of $P$ removed is even. Continue this process until there are no good triangles on the $A-B$ segment. Since the $A-B$ segment has an odd number of sides, at least one side $\alpha$ is not removed (if $AB$ itself is a side of $P$, then $\alpha = AB$), and $\alpha$ does not belong to a smaller leg segment than $AB$. Similarly, after removing several good triangles from the $A-C$ segment, there is a side $\beta$ of $P$ that does not belong to a smaller leg segment than $AC$. Let the triangle $\triangle ABC$ correspond to the 2-element set $\{\alpha, \beta\}$.

For two different good triangles $\triangle ABC$ and $\triangle A_1B_1C_1$ in the same division, their corresponding 2-element sets are $\{\alpha, \beta\}$ and $\{\alpha_1, \beta_1\}$. If $\triangle A_1B_1C_1$ is not on the leg segment of $\triangle ABC$, then $\triangle A_1B_1C_1$ is on the $B-C$ segment of $\triangle ABC$. In this case, the sides in $\{\alpha, \beta\}$ are on the leg segments of $\triangle ABC$, and the sides in $\{\alpha_1, \beta_1\}$ are on the $B-C$ segment of $\triangle ABC$, so $\{\alpha, \beta\}$ and $\{\alpha_1, \beta_1\}$ have no common sides; if $\triangle A_1B_1C_1$ is on the leg segment of $\triangle ABC$, say on the $A-B$ segment, then the sides in the 2-element set $\{\alpha, \beta\}$ belong to the sides removed from the leg segment of $\triangle A_1B_1C_1$, and the sides in the 2-element set $\{\alpha_1, \beta_1\}$ are the sides of the leg segment of $\triangle A_1B_1C_1$, thus the two 2-element sets have no common sides.

Note that 2006 sides can have at most $\frac{2006}{2} = 1003$ 2-element subsets with no common elements, so the number of good triangles is no more than 1003.

Finally, let $P = A_1A_2 \cdots A_{2006}$, and the division graph formed by the diagonals $A_1A_{2k+1} (1 \leq k \leq 1002)$ and $A_{2k+1}A_{2k+3} (1 \leq k \leq 1001)$ has exactly 1003 good triangles.

Therefore, the maximum number of good triangles is 1003.