How do I query headings containing a particular inline tag in a folder?

If anyone is here for the solution, sadly I couldn’t figure it out. I’ve resorted back to using Create progress bars by counting number of YAML fields by creating a chapter per md file with YAML data inside.