The amount of files in a folder could theoretically be limitless. However, every time when the OS will access the specific folder to search for files, it will have to process all files in the folder. With less than 500 files, you might not notice any delays. But when you have tens of thousands of files in a single folder, a simple folder list command (ls or dir) could take way too long. When these folders can be accessed through FTP, it will really be too slow...
Performance issues won't really depend on your OS but on your system processor speed, disk capacities and memory. If you have that many files, you might want to combine them into a single archive, and use an archiving system that is optimized to hold a lot of data. This could be a ZIP file but better yet, store them as blobs in a database with the file name as primary key.