The maximum number of files on your drive is limited by the inode limit. For example:
/dev/vda 1310720 230115 1080605 18% /
Shows that there are only about 1,080,000 free inodes (1,310,720 total and 230,115 used) on my droplet. So you would have to keep it under that.
You cannot currently change the number of inodes. DigitalOcean currently uses an inode ratio of 16kb meaning 20gb / 16kb = the max number of inodes. So more disk space would allow you to host more files.