counting sort(applied to a range of dense data)