Write digit_count(n) that returns how many digits the non-negative integer n has. Do it with arithmetic and a loop rather than converting to a string. Note that 0 has one digit.
Examples
Input: n = 12345
Output: 5
Input: n = 0
Output: 1
Constraints
0 <= n <= 10**18
Goals
- Peel off one digit at a time with integer division by 10
- Handle the special case of the number 0