For example, lets say that there's an ancient Greek writer who has some choice words about a particular politician. Is there any way that historians can determine how common that opinion was among the rest of the population?
If there is only one source, I'd hard pressed to draw a conclusion other than, Greek A is not fond of Greek B. However say, that Greek B stands for Viewpoint B. Greek A speaks ill of Greek B and his viewpoint. At the same time there is evidence that people gathered in protest at the Forum because of Viewpoint B. Now we can start to assume that this was a general view of Greek B.
The discipline is the ask the right question to a different number of sources. If we are only looking for sources were someone utters an opinion of Greek B, we might have a hard time finding them.
To give a newer example:
I want to find out what the public opinion of Donald Trump was during the presidential election. I have a number of sources: notes from public debates, internet memes, blog posts, etc. Now I can't use the utterances by the politicians in the debates for that much. Simply because an opponent by definition will have a different viewpoint. So I look at the internet memes. Well, a lot of these are satirical. This gives me an idea that his popularity weren't that great. At the same I have a lot of news clippings and blogposts that speak in favor of him. So I start to look at political affiliations. Well, most of the memes come from Reddit, a site I discover is considerably left-wing. As I dig more and more, I find that his popularity depends on politcal affiliation.
The principle is the same, however because of the lack of sources from the antique, you may have to be even more abstract in your source material. The important thing is just to have a clear focus and knowing what to ask, and how to ask it from the different sources.