Each digit must be a factor of 10000, so the only possible digits are 1, 2, 4, 5, and 8. Furthermore, since the prime factorization of 10000 is there must be exactly four digits of 5. Among the remaining three digits, we also need four factors of 2. We have the following cases.
Case 1: The remaining three digits are 1, 2, and 8.
We want to arrange the digits 5, 5, 5, 5, 1, 2, and 8. There are 7!4!=210 ways to arrange these digits.
Case 2: The remaining three digits are 1, 4, and 4.
We want to arrange the digits 5, 5, 5, 5, 1, 4, and 4. There are 7!4!2!=105 ways to arrange these digits.
Case 3: The remaining three digits are 2, 2, and 4.
We want to arrange the digits 5, 5, 5, 5, 2, 2, and 4. There are 7!4!2!=105 ways to arrange these digits.
Thus, there are a total of 210+105+105=420 7-digit numbers.