Tried to count the number of links without associated files.

Perhaps useful? → Is there a way to see backlinks without creating a markdown document? - #3 by JLDiaz

The link above shows all non-existing pages that are referenced from other notes. For each non-existing page, a list of links to the notes that refer to it is presented.

Or perhaps you are looking for the opposite: a list of all notes that contain links to non-existing notes.

The following code will provide this (the table is sorted in descending order of broken links):

```dataviewjs
const data = dv.app.metadataCache.unresolvedLinks;

const rows = Object.entries(data)
    .map(([path, links]) => ({ path, count: Object.keys(links).length }))
    .filter(item => item.count > 0)
    .sort((a, b) => b.count - a.count);

dv.table(["Note", "Broken links"],
    rows.map(item => [dv.fileLink(item.path), item.count]));
```