'Returns a dictionary mapping device id\'s to (number of
partitions assigned to that device).'

def _partition_counts(self, builder):

    return Counter((builder.devs[dev_id]['id'] for part2dev_id in builder._replica2part2dev for dev_id in part2dev_id))
