code: long count(final MongoNamespace namespace, final Bson filter, final CountOptions options) {
      this.waitUntilInitialized();
  
      try {
        ongoingOperationsGroup.enter();
        return getLocalCollection(namespace).countDocuments(filter, options);
      } finally {
        ongoingOperationsGroup.exit();
      }
    }
docs: Counts the number of documents in the collection according to the given options.
  
  @param filter  the query filter
  @param options the options describing the count
  @return the number of documents in the collection