Sort state counts properly.