title: How to count number of files in each directory?
body: <p>I am able to list all the directories by</p>
  
  <pre><code>find ./ -type d
  </code></pre>
  
  <p>I attempted to list the contents of each directory and count the number of files in each directory by using the following command</p>
  
  <pre><code>find ./ -type d | xargs ls -l | wc -l
  </code></pre>
  
  <p>But this summed the total number of lines returned by</p>
  
  <pre><code>find ./ -type d | xargs ls -l
  </code></pre>
  
  <p>Is there a way I can count the number of files in each directory?</p>