[CoreBundle] Don't call `count()` on collection if not needed