would like to get count of files in home dir in python
<p>I saw this <a href="http://stackoverflow.com/questions/2632205/count-the-number-of-files-in-a-directory-using-python">Count the number of files in a directory using python</a></p>

<p>and have this:</p>

<pre><code>import os, os.path

print len([name for name in os.listdir(os.path.expanduser("~")) if os.path.isfile(name)])
</code></pre>

<p>but it always returns 0. How would i modify this to return the count of files?</p>

<p>thx</p>
