Rather than incrementing a counter manually, couldn't we do something like `doc_count = len(message.children)` after the loop?