Instead of using the standard download button you will have to use a create a custom download microflow. In your domainmodel you create an entity counter which you associate with file.
When a user presses the download button you will start a microflow with the file as parameter. The first activity can then be the download file action. If the download is succesful you can retrieve the counter associated with this file and set it to $counter+1 and commit it. This way you can count the downloads.
Hope this helps