Example 2: With $2009^{12}$ as one of the legs, and all three sides being integers, the number of different right-angled triangles (congruent triangles are considered the same) is $\qquad$.

(2009, International Mathematics Tournament of the Cities for Young Mathematicians)