FTP not showing all files

The FTP Server is showing 9998 files in a specific directory but the actual count is 18238 files. There is also another directory with 18244 files but the FTP server shows 9998 files. I tested on FileZilla and AirExplorer. How can I solve this? I want to backup all of these files.