1. log the information: You need a database of some kind, be that SQL or simple text files. Most people would likely opt for mySQL. Instead of linking directly to the files to download, you link through a script which logs the count in the database, and delivers the file.
2. sort the info: You then need to query your database using a programming language like ASP or PHP.
3. display it on the page: output the data using your programming language of choice.
This is a relatively straightforward tasks if you're familiar with a programming language.
So, if you were to opt for PHP/mySQL:
- Create a database for storing the name of the download and the count
- When a file is downloaded, use a script to add one to the count in the database and then redirect to the file
- Use PHP to retrieve the downloads with the highest count, and output this info to the page.
If you want to learn how to use programming languages/databases, this would be a good exercise to start with since it's not totally easy, but isn't onerously difficult either.
The alternative is to just search Google or wherever for 'download counter' and use a pre-made solution. You'd just need to take care not to pick one that was badly written, and you'll obviously still need to install/configure it.
Your choice will be restricted by what technology is available on your site.