The higher the number of backlinks, and the quality of each, the higher will be the ranking. So it is not just about the number of links. These links need to be coming from good quality sites as well. The links from a blog of a known friend may not be as powerful as the one that comes from Business Insider or Fox News obviously, but they need to be related content as well.
It is okay to have links from sites that are related to the topic being written which makes sense, supplements with extra information so it looks natural. Getting a link from a totally unrelated site, will not help. Beware of getting links from spammy sites, in fact, they can negatively affect your ranking. Not all links are equal, do not think adding your link in the comments section of a reputed site can rank you higher. It has to be natural and linked and created by the site owner. One of the factors that are used is to ensure that links are of high quality is to link to a site that has a higher domain authority or DA. This metric was developed by Moz and it predicts how well a site ranks. The higher the DA of the site that you link from, the better it is for your site.