ch8.2 counting sort