a counting sort in ruby