KeyValue icon

KeyValue

Store and retrieve key-value pairs on the filesystem

Actions20

Record → Count

AI-generated

Summary

Counts regular files in the selected directory, optionally filtering by key pattern and frontmatter tag. Returns one count result for each incoming item; the operation does not modify records.

Inputs

  • Directory Name (required) — Directory whose records to count.
  • Key Filter — Optional glob pattern matching record filenames. * matches any characters and ? matches one character; empty matches all files.
  • Tag Filter — Optional exact tag value; only records whose parsed frontmatter tags include it are counted. Empty matches all records.

Output shape

A list containing one item per incoming item, each with directory and count fields.

Counts regular files in the directory. When a tag filter is set, reads and parses each candidate file's frontmatter to check its tags. A missing directory raises an error.

Links

Discussion