Quiet late but this should help everyone else to get the answer for this question.
The practical limit for number of open files in linux can also be counted using maximum number of file descriptor a process can open.
I have seen limits being changed from system to system. From the getlimit man page you can see that
RLIMIT_NOFILE-1 specifies the limits internally.
To check RLIMIT_NOFILE value you can use the below statement to get a tuple
python -c "import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))"
The tuple returns results as (Soflimit, hardlimit). For me running on multiple systems results are like below
(1024, 1048576) # on UBUNTU linux
(65536, 65536) # on amazon linux
(1024, 9223372036854775807) # on macos
Note: 9223372036854775807 this number simply means infinity. You will always reach other resource limits before you ever hit this. If you have do modify the hardlimit on a system beyond what it is, you will have to modify kernel params.