Example 1.5 Let $N$ denote the number of 5-digit numbers where the ten-thousands place is not 5 and all digits are distinct, find $N$.


Solution: We can sequentially determine the ten-thousands place, thousands place, hundreds place, tens place, and units place digits to form a 5-digit number that satisfies the problem's conditions. Since the ten-thousands place digit cannot be 0 or 5, and all digits must be distinct, the methods to determine the ten-thousands, thousands, hundreds, tens, and units place digits are 8, 9, 8, 7, and 6, respectively. By the multiplication principle, we have
$$
N=8 \times 9 \times 8 \times 7 \times 6=24192 \text {. }
$$