Count number of links.