Things I have tried - the snippet is also the solution!
%% List the number of notes in a folder %%
LIST "Number of notes: " + length(rows.file.link)
FROM "path/folder"
WHERE file.folder
GROUP BY folder
Replace “path/folder” with the path and name of the folder you are interested in.