def num_permutations(list_of_lists):
  """
  Returns the number of permutations from an input
  list of lists, representing domains.
  """
  if not list_of_lists:
    return 0
  count = 1
  for lst in list_of_lists:
    count *= len(lst)
  return count