python program to count digits in a number