title: Comparing Python nested lists and count duplicates
body: <p>I have two nested lists with strings (<code>list_a</code> and <code>list_b</code>), details below:</p>
  
  <pre><code>list_a = [
  ('shop1', 'stand1', 'shelf1', 'fruit1'),
  ('shop1', 'stand1', 'shelf2', 'fruit2'),
  ('shop1', 'stand1', 'shelf3', 'fruit3'),
  ('shop1', 'stand2', 'shelf1', 'fruit1'),
  ('shop1', 'stand2', 'shelf2', 'fruit2'),
  ('shop1', 'stand2', 'shelf3', 'fruit3'),
  ('shop2', 'stand3', 'shelf1', 'fruit1'),
  ('shop2', 'stand3', 'shelf2', 'fruit2'),
  ('shop2', 'stand3', 'shelf3', 'fruit3')
  ]
  list_b = [
  ('shop1', 'stand1', 'shelf1', 'fruit1'),
  ('shop1', 'stand1', 'shelf2', 'fruit2'),
  ('shop1', 'stand1', 'shelf2', 'fruit2'),
  ('shop1', 'stand1', 'shelf3', 'fruit3'),
  ('shop1', 'stand1', 'shelf3', 'fruit3'),
  ('shop1', 'stand1', 'shelf3', 'fruit3'),
  ('shop1', 'stand2', 'shelf1', 'fruit1'),
  ('shop1', 'stand2', 'shelf1', 'fruit1'),
  ('shop1', 'stand2', 'shelf1', 'fruit1'),
  ('shop1', 'stand2', 'shelf2', 'fruit2'),
  ('shop1', 'stand2', 'shelf2', 'fruit2'),
  ('shop1', 'stand2', 'shelf2', 'fruit2'),
  ('shop1', 'stand2', 'shelf3', 'fruit3'),
  ('shop2', 'stand3', 'shelf1', 'fruit1'),
  ('shop2', 'stand3', 'shelf1', 'fruit1'),
  ('shop2', 'stand3', 'shelf2', 'fruit2'),
  ('shop2', 'stand3', 'shelf3', 'fruit3'),
  ('shop2', 'stand3', 'shelf3', 'fruit3'),
  ('shop2', 'stand3', 'shelf3', 'fruit3')
  ]
  </code></pre>
  
  <p>and I would like to find identical rows from <code>list_b</code> in <code>list_a</code>, count "duplicated" rows and merge list_a with one additional column (number of occurrences) as a new list, like this below:</p>
  
  <pre><code>result_list = [
  ('shop1', 'stand1', 'shelf1', 'fruit1', 1),
  ('shop1', 'stand1', 'shelf2', 'fruit2', 2),
  ('shop1', 'stand1', 'shelf3', 'fruit3', 3),
  ('shop1', 'stand2', 'shelf1', 'fruit1', 3),
  ('shop1', 'stand2', 'shelf2', 'fruit2', 3),
  ('shop1', 'stand2', 'shelf3', 'fruit3', 1),
  ('shop2', 'stand3', 'shelf1', 'fruit1', 2),
  ('shop2', 'stand3', 'shelf2', 'fruit2', 1),
  ('shop2', 'stand3', 'shelf3', 'fruit3', 3)
  ]
  </code></pre>
  
  <p>Is there any quick and efficient way to do this? </p>