You're going to want to start by creating a download file, preferably in php, which will accept a file parameter. An example would be "download.php?file=42.txt". From there the file will update the download count, and fetch the file from the uploads folder.