Maximum number of files

Is there a maximum number of files allowed in a directory before the library system falls over?

I used to have all my stand alone films in one directory (about 1800 films), but XBMC/Kodi was unable to process it. Once I split it into two directories, it could handle each directory fine?

Is this how it’s meant to be, or was I doing something wrong?