title: Count files in Folder by Python Programming
body: <p>I am trying to count number of files in my folder (/Home/python)
  for that reason I make a short program</p>
  
  <pre><code>import os.path
  path = '/Home/python'
  num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))])
  </code></pre>
  
  <p>but it is given me an error like that</p>
  
  <pre><code>Traceback (most recent call last):
    File "count_number_of_files_folder.py", line 3, in &lt;module&gt;
      num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))])
  OSError: [Errno 2] No such file or directory: '/Home/python'
  </code></pre>
  
  <p>Guys can you plz help me to make it bug free program.
  Thank You</p>
  
  <p><img src="https://i.stack.imgur.com/oLYUr.png" alt="enter image description here"></p>