Counts sum of digits