'Count the resources whose names begin with \'auto_allocated_\'.'

def _count_topology_resources(self):

    def _count(resources):
        return len([resource['id'] for resource in resources if resource['name'].startswith('auto_allocated_')])
    up = {'admin_state_up': True}
    networks = _count(self.client.list_networks(**up)['networks'])
    subnets = _count(self.client.list_subnets(**up)['subnets'])
    routers = _count(self.client.list_routers(**up)['routers'])
    return (networks, subnets, routers)
