5. How many different right-angled triangles with integer side lengths have an area that is 999 times their perimeter (considering congruent triangles as the same)? (Provided by Lin Chang)

Will translate the problem and maintain the original format and line breaks as requested.
5. Let the three sides of a right-angled triangle be \(a, b, c\) (with \(c\) being the hypotenuse).
From the Pythagorean triple formula, we have
\[
a = k \cdot 2uv, \quad b = k(u^2 - v^2), \quad c = k(u^2 + v^2),
\]
where the greatest common divisor of the three sides \(k\) is a positive integer, \(u\) and \(v\) are coprime, \(u > v\), and \(u\) and \(v\) are of opposite parity.
\[
\begin{array}{l}
\text{Then } \frac{1}{2} ab = 999(a + b + c) \\
\Leftrightarrow k^2 uv(u^2 - v^2) = 999 \times 2u(u + v) \\
\Leftrightarrow k v(u - v) = 1998 = 2 \times 3^3 \times 37.
\end{array}
\]

Notice that \(u - v\) is odd, so the factor 2 can only be assigned to \(k\) or \(v\), giving two ways; \(v\) and \(u - v\) are coprime, and the odd prime factor \(p^\alpha\) can be assigned to \(k\), \(v\), or \(u - v\) in the following ways: \((\alpha, 0, 0)\), \((i, \alpha - i, 0)\), \((i, 0, \alpha - i)\) \((1 \leqslant i \leqslant \alpha)\), giving \(2\alpha + 1\) ways.
By the multiplication principle, the number of ways to assign the prime factors is
\[
2(2 \times 3 + 1)(2 \times 1 + 1) = 42.
\]

Each way of assigning the prime factors gives a unique triangle.
Therefore, there are 42 such triangles.
[Note] Generally, if the multiple is \(m = 2^\alpha p_1^{\beta_1} p_2^{\beta_2} \cdots p_n^{\beta_n}\) \((p_1, p_2, \cdots, p_n\) are distinct odd primes), then the number of such triangles is
\[
(\alpha + 2)(2\beta_1 + 1)(2\beta_2 + 1) \cdots (2\beta_n + 1).
\]