title: Count negative values in a list of integers using Python?
body: <p>I am having problems with <a href="http://codingbat.com/prob/p210362" rel="nofollow">this</a> CodingBat question:</p>
  
  <blockquote>
    <p>Given a list of integers, return the count of the negative values. </p>
  </blockquote>
  
  <pre><code>count_negative([-1, -2, -3]) → 3
  count_negative([2, 2, 2, 2, 2]) → 0
  count_negative([-5, -3, 4]) → 2 
  </code></pre>
  
  <p>Why doesn't this code run correctly?</p>
  
  <pre><code>def count_negative(list):
    for value in list:
        total = 0
        total += value
        return total
  </code></pre>