1) Is it any alternative to looping through `/proc` in order to get the total number of open file descriptors?
I used the following dirs:

```
/proc/PID/fd/* 
/proc/PID/maps 
/proc/PID/cwd 
/proc/PID/root 
/proc/PID/exe 

```

2) The number is different from `lsof | wc -l` and `cat /proc/sys/fs/file-nr`

3) Loaded dynamically linked libraries and current working directories can be counted as open file descriptors?
Implementation all open file descriptors in C for Linux