nodes: 0, module; 1, function_definition; 2, function_name:count_account; 3, parameters; 4, block; 5, identifier:self; 6, identifier:domain; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, return_statement; 13, comment:""" Count the number of accounts for a given domain, sorted by cos
  
          :returns: a list of pairs <ClassOfService object>,count
          """; 14, assignment; 15, assignment; 16, assignment; 17, identifier:i; 18, identifier:cos_list; 19, block; 20, call; 21, identifier:selector; 22, call; 23, identifier:cos_list; 24, call; 25, identifier:ret; 26, list; 27, expression_statement; 28, expression_statement; 29, identifier:list; 30, argument_list; 31, attribute; 32, argument_list; 33, attribute; 34, argument_list; 35, assignment; 36, call; 37, identifier:ret; 38, identifier:domain; 39, identifier:to_selector; 40, identifier:self; 41, identifier:request_list; 42, string; 43, dictionary; 44, identifier:count; 45, call; 46, attribute; 47, argument_list; 48, string_content:CountAccount; 49, pair; 50, identifier:int; 51, argument_list; 52, identifier:ret; 53, identifier:append; 54, tuple; 55, string; 56, identifier:selector; 57, subscript; 58, call; 59, identifier:count; 60, string_content:domain; 61, identifier:i; 62, string; 63, attribute; 64, argument_list; 65, string_content:_content; 66, attribute; 67, identifier:from_dict; 68, identifier:i; 69, identifier:zobjects; 70, identifier:ClassOfService
code: def count_account(self, domain):
          """ Count the number of accounts for a given domain, sorted by cos
  
          :returns: a list of pairs <ClassOfService object>,count
          """
          selector = domain.to_selector()
          cos_list = self.request_list('CountAccount', {'domain': selector})
          ret = []
  
          for i in cos_list:
              count = int(i['_content'])
              ret.append((zobjects.ClassOfService.from_dict(i),  count))
  
          return list(ret)