code: def count_records(self, record_counter, file):
          
          counter = record_counter
          events_counter = 0
          for record in file.get_records():
              recid = record[2]
              counter[recid] = counter.get(recid, 0) + 1
              events_counter += 1
  
          self.stat['user_record_events'] = events_counter
          return counter
docs: Count the number of viewed records.