def get_channel_count(self, actor_nick):
    batch_size = 1000
    count = 0
    q = self.get_channel_relationship_query(actor_nick)
    memberships = q.fetch(batch_size)
    while memberships:
      count += len(memberships)
      q = self.get_channel_relationship_query(actor_nick)
      q.filter("__key__ >", memberships[-1].key())
      memberships = q.fetch(batch_size)

    return count
Returns the number of channels the actor is a member of.
dataset/ETHPy150Open CollabQ/CollabQ/bin/backfill_channel_count.py/ChannelCountBackfiller.get_channel_count