This will fetch the links that point back to the org roam node.
left outer join nodes
on links.dest = nodes.id
left outer join nodes n2
on links.source = n2.id
where nodes.title = '\"org roam\"'")Count by inbound links:
left outer join nodes
on links.dest = nodes.id
left outer join nodes n2
on links.source = n2.id
group by n2.title
order by inbound_links desc")