Where do sources such as alexa, compete, etc collect their data from to build internet statistics such as the top websites and websites' most visited from countries list?
These sites gather raw data by tracking behavior of their users for data-collection, and performing some statistical fudging to get traffic estimates.
In Alexa's case, it gathers from Alexa toolbar users' data. Compete does the same, but with a larger and more broadly defined "panel" of users.