Fix count operator bug