Sort colors (counting, three way partition)