What counts as a link here
This fetches the page and counts every <a href> element, splitting the total into internal
(same-site) versus external links, and dofollow versus nofollow based on each link's rel attribute.
A page with an unusually high external or nofollow count relative to its content length can be worth a second
look - it may indicate excessive outbound linking or an over-aggressive nofollow policy.
Why the internal/external split matters for SEO
Internal links distribute "link equity" and crawl priority across your own site, helping search engines find and understand the relationship between your pages, while external links send visitors (and some authority signal) elsewhere - a healthy page typically has a reasonable balance of both rather than being dominated entirely by one type.
Why the dofollow/nofollow split is worth checking
A rel="nofollow" attribute tells search engines not to pass ranking credit through that link -
useful for user-generated content, paid placements, or links you don't want to vouch for, but a page where
nearly everything is accidentally marked nofollow (including links that should count) can be quietly
undermining its own internal linking strategy.
What this count can't tell you
It only counts links present in the page's initial HTML response, not links injected afterward by client-side JavaScript - and it says nothing about link placement, surrounding anchor text quality, or whether a link is actually useful to a visitor, all of which matter more than the raw count alone.