counts and sorted