@Override
    public <T> long apply(
        final SqlStreamOptimizerInfo<ENTITY> info,
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final ReferencePipeline<T> pipeline
    ) {
        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);
        return countHelper(
            info,
            sqlStreamTerminator,
            pipeline,
            () -> CountTerminator.<ENTITY>defaultTerminator().apply(info, sqlStreamTerminator, pipeline)
        );
    }
@author Per Minborg
@param <ENTITY> the original stream entity source type
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/internal/component/sql/override/optimized/reference/OptimizedCountTerminator.java