Compete & Alexa heavily rely on browser toolbars (<a href="http://www.compete.com/help/s11" rel="nofollow">http://www.compete.com/help/s11</a>) to estimate their data. They work hard to normalize their data, but you can probably imagine that the demographic of people with that kind of toolbar installed is heavily skewed (and some people argue loudly against it: <a href="http://venturebeat.com/2007/02/22/traffic-measuring-continued-why-compete-doesnt-work-and-why-quantcast-does/" rel="nofollow">http://venturebeat.com/2007/02/22/traffic-measuring-continue...</a>)<p>Other sites, like Comscore, use various methods like router-level analysis & client-side monitoring software (like Nielson w/ TVs).<p>In the end, no method is 100% accurate and the best analysis comes from looking at various sources & taking it all with a grain of salt.
In the UK there is the ABC (Audit Bureau of Circulation IIRC) to whom you can send your Apache logs and they'll give you an official number. This is where magazine readership figures come from too. Having a neutral third party do it is important for advertisers.
A good way of understanding the popularity of a website is google trend. This article on Techcrunch shows an example of obvious bad data with Hitwise (which can be applied to Alexa and Compete as well): <a href="http://www.techcrunch.com/2009/03/20/new-hitwise-stats-show-how-bad-hitwise-data-is/" rel="nofollow">http://www.techcrunch.com/2009/03/20/new-hitwise-stats-show-...</a><p>At the end of the day, everyone who owns a blog or a website (myself included) has been able to experience first hand how flawed the data from such companies are by simply comparing them with their own google analytics data :-)
They get a lot of their data by purchasing ISP traffic logs and parsing it. The browser data only serves as a much smaller "focus group" pool of users.