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.
xrange is called 'range' in python3, change is python2 compatible
Merge remote-tracking branch 'mmn/xrange_replaces_range_in_python3' into develop

 * CHANGE an occurence of xrange() iteration over a fixed length list to use
   range(); Python3's range() function is equivalent to Python2's xrange(),
   while the small fixed length of the list in this case doesn't effect speed
   at all.
Merge remote-tracking branch 'mmn/python3_KeysView_object_is_not_indexable' into develop

 * FIX Python3 error where a :class:`collections.OrderedDict` instance,
   including it's keys() method, is not iterable.
 * CLOSES PR#7 In Python 3 OrderedDict.keys() are not indexable