IndexingTestDb: count changes as the result of addToIndex/removeToIndex

This brings the test backend in accordance with the behavior of the
Redis backend.