Fix counting tests.