If you are talking broadcast TV, ratings (at least Nielsen which is the source for TV ratings in the US) monitors all platforms- TV, computer, mobile for seven days. As long as the viewing is done on a legitimate source within those 7 days it is counted in the ratings. Granted, I think day+date ratings are looked at more favorably than the +7 ratings, but still... Viewings from pirated sources (torrents, youtube, online out-of-country streaming websites) do not count. Neither do thumbs up.
The only time viewing from a pirated source seems to matter is with HBO's Game of Thrones in which they seem to revel in the fact it's the most pirated show ever.