Noted Tolkienist Michael Martinez has published a long-ish essay which deals with this exact question, and may be read online here: Of Thegns and Kings and Rangers and Things.
I'll quote the main conclusions, first of all relating to the population of the Dunedain of the North:
It thus seems most likely that Rangers constituted only a small part of the male population of the Dunedain of Arnor. Elrond was not wrong to say there were now few Dunedain left, but they probably numbered in the thousands, rather than the hundreds.
The numbering of Halbarad's company:
...it would have fallen to the Dunedain to defend Eriador against invasion. In such a time of need, the Rangers would have been called back to defend the homeland and patrol the frontier. Halbarad’s ability to muster a company of Rangers would therefore have been hampered not by fewness of men, but by the necessity to leave his people (and Rivendell) defended.
The organization of Ranger patrols:
It seems there must have been roving patrols which watched over the lands east of Bree, between Bree and the Angle, in fact. These patrols probably went as far north as the ruins of Fornost Erain (where Gandalf told Barliman the Rangers visited on occasion) and as far south as Tharbad. There may have been no more than three hundred Rangers in all, not necessarily organized into companies of thirty, but patrolling assigned regions.
And the function of the Rangers:
The Rangers were as close to a police force as Eriador had, and were undoubtedly an elite force of soldiers who were highly motivated, well-trained, and well-equipped. The thirty who accompanied Halbarad were all dressed in uniform attire, and they possessed similar weapons: swords, bows, and spears. Their somber discipline (observed by Legolas, Gimli, and Meriadoc at Helm’s Deep) similarly implies they were professional warriors.
For the long chain of reasoning that leads to these conclusions, and for the supporting facts from Tolkien's writings, I'll refer you to the essay itself (via the link I provide above) which is unfortunately really too long to give here in full.