title: Counting occurrences in Vim without marking the buffer changed
body: <p>In order to know how many times a pattern exists in current buffer, I do:</p>
  
  <pre><code>:%s/pattern-here/pattern-here/g
  </code></pre>
  
  <p>It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status.</p>
  
  <p>Is there a more elegant way to count?</p>