title: Count duplicates between 2 lists
body: <pre><code>a = [1, 2, 9, 5, 1]
  b = [9, 8, 7, 6, 5]
  </code></pre>
  
  <p>I want to count the number of duplicates between the two lists. So using the above, I want to return a count of 2 because 9 and 5 are common to both lists.</p>
  
  <p>I tried something like this but it didn't quite work.</p>
  
  <pre><code>def filter_(x, y):
      count = 0
      for num in y:
          if num in x:
              count += 1
              return count
  </code></pre>