python count number of digits in integer