@Override
    public long apply(
        final SqlStreamOptimizerInfo<ENTITY> info,
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final IntPipeline pipeline
    ) {
        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);

        final IntPipeline optimizedPipeline = sqlStreamTerminator.optimize(pipeline);
        return sqlStreamTerminator
            .attachTraceData(optimizedPipeline)
            .getAsIntStream().count();
    }
@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/def/ints/DefaultIntCountTerminator.java