Try to reproduce the circumstances of the 'negative' bug by adding a routine that adds events for existing users instead of creating new ones.
Include the 'initial' events in the count
Add a check of the underlying event count. This seems to produce a failure when using the Azure table storage engine
The bug is happening only when using Azure storage, so change this test to use Azure storage (it now fails)
Use a reduced event count so that the test will complete in a reasonable time on our servers
Commit the cache before re-reducing (seems to fix negative values bug)
Update query version to force any broken queries to re-run