Count each tag in a single document

Not quite there

All of the data that I want to look at is in the single note that is currently open

IF I were to do this in SQL, I would do something like:

SELECT
    tag as Task,
    COUNT(*) as Qty
FROM (how ever the heck I say this note)
GROUP BY tag
ORDER BY tah

That would give me

Task   Qty
task1  2
task2  1
task3  1