XD-368: Improve redis connection use in aggregate counter

Implemented as a single action using a RedisCallback.