def most_common_types(limit=10, objects=None, shortnames=True):
 stats = sorted(typestats(objects, shortnames=shortnames).items(), key=operator.itemgetter(1), reverse=True)
 if limit:
  stats = stats[:limit]
 return stats

def most_common_types ( limit = 10 , objects = None , shortnames = True ) : stats = sorted ( typestats ( objects , shortnames = shortnames ) . items ( ) , key = operator . itemgetter ( 1 ) , reverse = True ) if limit : stats = stats [ : limit ] return stats
count the names of types with the most instances .