While an interesting approach, I don't think this will work.  The issue with using this in a multithreaded environment is that you really have multiple counts going at once (one chunk on each thread).  If we are going to support restart, take a look at the MongoItemWriter or the TransactionAwareBufferedWriter.  Both use a TransacitonSynchronizationManager to maintain a resource (the count in this case) and apply it upon the commit of the transaction (the update method call in this case).  Sorry for not mentioning it sooner, but I thought about it after you created this PR.