title: What are the dangers when using "!=" "not equal" in the stop condition
body: <pre><code>count = 10;  //may queried from DB 
  
  while(0 != count) {
      --count;
      //do_lottery();
  }
  </code></pre>
  
  <p>I heard a story that a company using this piece of code unexpectedly gave out a lot of iPads as gifts.
  Because the counter goes below 0 and the code still running without an end.</p>
  
  <p>How could it happen? any scenario?</p>
  
  <p>about multi-threads and lock?</p>