Count number of digits in a number python