Update logic for countsort.cc