Documents (records) are generally processed through snaps (including the router) in a streaming fashion, independent of each other. To accomplish what you’re looking for, perhaps you could group all the documents together using one of the group by snaps to get a “before” count to copy down a side path. Then split them back apart into separate documents again and do whatever processing. Then afterwards group them back together again to get an “after” count, which you could merge back with the “before” count to compare and take action on. Best if you can leave things streaming though, especially if it might be a lot of documents.