The first version of the download stats functionality was pretty simple: each time a file was downloaded, its name was saved in the downloads.txt file as a new line. It's not a particularly practical solution when the download count reaches thousands or tens of thousands.
So I've reworked the feature. Now, the number of downloads for each file is stored in the accompanying .downloads file. This makes it possible to add the Downloads info to each photo.