Bilal Ahmad answered Yes affiliate links are counted in backlinks if they are dofollow. If they are nofollow then they will not count and will not pass the link juice.Any dofollow link pointed to a domain counts as a backlink and affiliate links are also included.