Using JFS2, there is no hard limit as far as I know.
There might be some limitations on the number of inodes your filesystem can allocate, although JFS2 can also perform on-demand inode allocation.
From IBM's official documentation:
Quote:
[...] the number of i-nodes available is limited by the size of the file system itself.
Theoretically JFS2 filesystems can support files up to 2 PBs in size. In reality however there's a pseudo-hard limit (the OS will warn you if you try to exceed this limit) set to 32 TB with files no larger than 16 TB.
So, if you were given an infinite amount of disk space under JFS2 it would be possible to have an infinite amount of files as long as the sum of their size did not exceed 2 PBs.
This means you still won't be able to store the whole Internet in your system.
EDIT: And yes, to the eyes of the OS, a directory is still a file.