6505: Backport global shards
6505: Tests for CounterContext changes