In Python 3 OrderedDict.keys() are not indexable

We could always cast counts.keys() to a list, from the dictionary view they
are but a more efficient way of doing this is to simply pop the items from
our result list as we traverse the returned iterable dictionary view.