Added functionality for sorting the Counters.