class DefaultDoubleCountTerminator<ENTITY> implements DoubleCountTerminator<ENTITY> {

    private DefaultDoubleCountTerminator() {
    }

    @Override
    public long apply(
        final SqlStreamOptimizerInfo<ENTITY> info,
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final DoublePipeline pipeline
    ) {<FILL_FUNCTION_BODY>}

    public static final DoubleCountTerminator<?> DEFAULT = new DefaultDoubleCountTerminator<>();

}

        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);

        final DoublePipeline optimizedPipeline = sqlStreamTerminator.optimize(pipeline);
        return sqlStreamTerminator
            .attachTraceData(optimizedPipeline)
            .getAsDoubleStream().count();
    
<no_super_class>