title: Count the number of "holes" in a bitmap
body: <p>Consider a MxN bitmap where the cells are 0 or 1.  '1' means filled and '0' means empty.</p>
  
  <p>Find the number of 'holes' in the bitmap, where a hole is a contiguous region of empty cells.</p>
  
  <p>For example, this has two holes:  </p>
  
  <pre><code>11111  
  10101  
  10101  
  11111  
  </code></pre>
  
  <p>... and this has only one:  </p>
  
  <pre><code>11111  
  10001  
  10101  
  11111
  </code></pre>
  
  <p>What is the fastest way, when M and N are both between 1 and 8?</p>
  
  <p><em>Clarification</em>: diagonals are not considered contiguous, only side-adjacency matters.</p>
  
  <p><em>Note</em>: I am looking for something that takes advantage of the data format.  I know how to transform this into a graph and [BD]FS it but that seems overkill.</p>