title: "invalid literal for int() with base 10:" What does this actually mean?
body: <p>Beginner here! I am writing a simple code to count how many times an item shows up in a list (ex. <code>count([1, 3, 1, 4, 1, 5], 1)</code> would return 3). </p>
  
  <p>This is what I originally had:</p>
  
  <pre><code>def count(sequence, item):
      s = 0
      for i in sequence:
         if int(i) == int(item):
             s += 1
      return s
  </code></pre>
  
  <p>Every time I submitted this code, I got </p>
  
  <blockquote>
    <p>"invalid literal for int() with base 10:"</p>
  </blockquote>
  
  <p>I've since figured out that the correct code is:</p>
  
  <pre><code>def count(sequence, item):
      s = 0
      for i in sequence:
         if **i == item**:
             s += 1
      return s
  </code></pre>
  
  <p>However, I'm just curious as to what that error statement means. Why can't I just leave in <code>int()</code>?</p>