python, javascript - downloading system and counting downloads.