How does Google count links? under Linkbuilding
Based on the amount of links and their quality, the search engines can calculate the popularity of your web page and therefore it’s position in rankings on the search engine result page. Quality links are the ones that lead to your website from sites, that have a high PageRank, are popular and trustworthy. The more quality links your site will have, the bigger the chance will be that it will score high rankings in search engines.