title: Counting open files per process
body: <p>I'm working on an application that monitors the processes' resources and gives a periodic report in Linux, but I faced a problem in extracting the open files count per process.</p>
  
  <p>This takes quite a while if I take all of the files and group them according to their PID and count them.</p>
  
  <p><strong>How can I take the open files count for each process in Linux?</strong></p>