I'm not sure, but the location field in the search is probably literal. So for example unless someone has put "Idaho, USA" for their location a search using USA as location will not find them.
So the idea of a script is probably the only way to get the real numbers for a country like the USA, since I've noticed a lot of the American members just put their state, or maybe town/city, and leave the USA bit assumed.