Count how many markdown files carry each note stem.
A stem carried by exactly one file resolves unambiguously vault-wide, so a rewritten wikilink can use the bare form; any stem whose post-move count exceeds one needs the path-qualified form.
Every parsed markdown file in the vault
Map from stem (basename without .md) to the number of markdown files carrying it
Count how many markdown files carry each note stem.
A stem carried by exactly one file resolves unambiguously vault-wide, so a rewritten wikilink can use the bare form; any stem whose post-move count exceeds one needs the path-qualified form.