Forget about the leading digits for a moment. There are a million 6-digit numbers ranging from 000000 to 999999. When we add the leading digit we can't use 0 or 4 so that leaves 8 digits we can use making the total number of 7-digit numbers 8 million.