class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {

    private final int scale;
    private final int offset;
    private final List<Long> bucketCounts = new ArrayList<>();

    ExponentialHistogramBucketsImpl(int scale, int offset) {
        this.scale = scale;
        this.offset = offset;
    }

    void addCount(long count) {
        bucketCounts.add(count);
    }

    @Override
    public int getScale() {
        return scale;
    }

    @Override
    public int getOffset() {
        return offset;
    }

    @Override
    public List<Long> getBucketCounts() {
        return bucketCounts;
    }

    @Override
    public long getTotalCount() {<FILL_FUNCTION_BODY>}
}

        long result = 0;
        for (Long count : bucketCounts) {
            result += count;
        }
        return result;
    
<no_super_class>