from typing import List
from typing import Dict
import collections


def count_chars(input_file_names: List[str]) -> Dict[str, int]:
  """Counts how often each char occurs in `input_file_names`."""
  hist = collections.defaultdict(int)
  for file_name in input_file_names:
    for line in open(file_name, 'rt'):
      for char in line:
        hist[char] += 1

  return dict(hist)