Simply paste the following snippet in your theme’s file and you will be able to count your WordPress website blogroll links.

Snippet Source/Credit: Jeff Starr