Consider the number of ways we may have a $0$ in the ones place. We may have $10, 20, 30\cdots 999990$. These are just the naturals $1, 2\cdots99999$ with a zero on the end.
However, we may also put a zero in the tens place. This may take the form of $100, 101\cdots999909$. These are the naturals $10,11\cdots99999$ with a zero injected before the ones place.
Similarly, we may count the zeros in the other places by considering the naturals into which they can be injected. Each position further left for the zero will require multiplying the starting number by ten to give a nonzero digit to the left.
The zeros required to write one to a million are $99999 + (99999 - 9) + (99999 - 99) + (99999 - 999) + (99999 - 9999) = 488889$.
EDIT: If you mean one to one million including the million, you have to add six to get $488895$. I guess I was thinking like a programmer too with the exclusive upper bound!