Add a method to get the number of digits in a number.