code: public GroovyExpression generateCountExpression(GroovyExpression itExpr) {
          GroovyExpression collectionExpr = new CastExpression(itExpr,"Collection");
          return new FunctionCallExpression(collectionExpr, "size");
      }
docs: assumes cast already performed