Use countImportedImageFiles for download. Fixes #12136
Merge pull request #2497 from will-moore/rebased/develop/orig_file_download_12136

Original File download 12136 (rebased onto develop)