title: git count files in the staged index
body: <p>I'm trying to figure out how to easily count the files in my uncommitted index.</p>
  
  <p>I've tried:</p>
  
  <pre><code>git status | grep '#' | wc -l
  </code></pre>
  
  <p>but there are a few lines that start with <code>#</code> that don't represent changed files. Anyone got anything better? Figured there had to be a flag for <code>git status</code> to do this.</p>
  
  <p>Even tools like GitX don't easily allow you to select the staged files/directories and see how many of them there are.</p>