add a countEqualTo constraint