I guess not. In that case the easiest solution might be

domain_map = {}
domain = object["data"]["domain"]
if domain not in domain_map:
  domain_map[domain] = 0
domain_map[domain] +=1

Then you don't even have to use numpy