Skills/Tables/Count records

Count records

Free

Returns the number of records in a collection that match a field-value filter. Omit the filter to count all records in the collection.

Cost

Free

What it accepts

Set these inside the intent when you run it.

collectionrequired

Name of the collection to count records in.

whereoptional

Filter expression to count only matching records; omit to count all.

What you get back

An integer count of records matching the filter.

Run it

Run this sub-skill directly: pin it with operation and pass its inputs in the intent. (Omit operation and the Tables skill will route from your intent instead.)

curl -X POST "https://skill.askfaro.com/skills/tables/run" \
  -H "Authorization: Bearer $FARO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"intent":{"operation":"count","collection":"tasks","where":"{\"status\": \"pending\"}"}}'

Example requests

  • How many tasks in my tasks collection have status pending
  • Count all records in the products collection
  • How many contacts have country set to US