Report number of pending changes in shard

Also refactor the _changes accumulator into a record.

BugzID: 24236
Collect pending counts and report sum at end

BugzID: 24236