You initially have x of each digit from 0 to 9. This means you have x * 10 digits in total. This count for each digit is shown in the table below.
Now start counting by ones, from 1. Each time you say a number you must remove the digits required to make the number from your stockpile of digits. For example, after you have counted from 1 to 13, the above table now looks like:
As an example, if you counted from 1 to 13 and didn't skip any numbers, the above table will look like:
What is the largest number x you can count to without running out of the digits needed to form the number?