Count number of digits