import re


def count_random_caps(text):
  """
  Determines the number of randomly capitalized words in `text`

  :param text: The text to analyze (str)
  :return: num_random_caps (int)
  """
  return len(re.findall(r"(?<!\.\s)(?<!\!\s)(?<!\?\s)\b[A-Z][a-z]*[^'][^I]\b", text))