'Returns the number of waiting targets an agent has.'

def count_current_targets(self, agentid):

    agent = self.get_agent(agentid)
    return sum((1 for fname in os.listdir(self.get_local_path(agent, os.path.join('remote', 'cur'))) if fname.endswith('.xml')))
