firestore_count
Count Firestore documents in a collection or collection group that match optional AND filters, using an aggregation query that reads no documents.
Instructions
Count the documents of a collection, or with collectionGroup of every collection with that id, that match optional where filters (a COUNT aggregation; no documents are read back).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | Filters combined with AND | |
| database | No | Firestore database id; default (default) | |
| collection | Yes | Collection path, or a collection id with collectionGroup | |
| collectionGroup | No | Collection-group query: every collection with the last segment's id at any depth under the parent (the database root for a bare id, e.g. posts; users/alice/posts for one document's descendants) |