cf.Field.count

Field.count(x)
Emulate
f.count(x)

Equality is tested with the field’s cf.Field.equals method (as opposed to the == operator).

Note that f.count(x) is equivalent to 1 if f.equals(x) else 0.