counting sort for vectors