count(providedQuery?: Query) {
    const syncCache = new SyncCache(this.tag);
    const query = new Query(providedQuery).equalTo('collection', this.collectionName);
    return syncCache.count(query);
  }