That is, exclude any number without 4 or 7.
If the last four digits do not carry 4 or 7
Each * * * has 8 digits to choose from, (0, 1, 2, 3, 5, 6, 8, 9).
* * * has four digits, so according to the combination principle, * * * has 8 * 8 * 8 = 4096 digits without 4 or 7.
Because there are 10000 numbers, the number of discount cards is 10000-4096=5904.