If you use google analytics they have a code you can use to track link clicks. Otherwise you will most likely need some sort of javascript tag to track clicks on specific links.
javascript isn't needed. the download link could be site.com/download.php?id=3 or something along those lines. they click on the link, which redirects to the file. inside the php file you would record the details where it is you want; mysql, flat file, etc.
Yes, pretty much like what disgust has mentioned. Assuming clicking the download link will prompt: /* download.php */ // connect and increment record in database //direct to the file for download header("http://www.secret.com/topsecret.pdf"); PHP: