Refactor UploadCounter.
Use ancestor queries in with root entity,
query/update in transaction.