import json


def get_counts(handle, id_col):
  """Print total and unique records. Used to sanity check dedup results."""
  ids = set()
  total = 0
  for line in handle:
    total += 1
    ids.add(json.loads(line)[id_col])
  print(' total:', total)
  print('unique:', len(ids))
  return total, len(ids)