The calculation and how PageRank is weighted have been modified over the years. The basic idea has been summarized by Google in this paragraph, which is quoted in the current Wikipedia article on PageRank [en.wikipedia.org...]
PageRank works by counting the number and quality of links to a page to determine a rough estimate of how important the website is. The underlying assumption is that more important websites are likely to receive more links from other websites.
The Google source page for this quote currently returns a 404. Google is probably rewriting it, as the quote might be misleading in suggesting that the number of links is most important factor. IMO quality is much more important than quantity.