Storm: use .count() instead of length filter

After the switch to Storm, we has to use the method count() for objects of type BoundReferenceSetBase.