Fix count query in test.