def _ordered_count(iterable):
 c = OrderedDict()
 for elem in iterable:
  c[elem] = (c.get(elem, 0) + 1)
 return c

def _ordered_count ( iterable ) : c = OrderedDict ( ) for elem in iterable : c [ elem ] = ( c . get ( elem , 0 ) + 1 ) return c
return dict of element counts .