add counting sort implementation