Fix typecasting when doing CQL3 counts