@Override
    public long fetchCount() {
        try {
            Predicate filter = createFilter(queryMixin.getMetadata());
            return collection.count(createQuery(filter));
        } catch (NoResults ex) {
            return 0L;
        }
    }
Fetch results with the specific fields

@param paths fields to return
@return results
querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java