def METHOD_NAME(session):
  results = session.query(f"""
    {PREFIXES}
    SELECT ?t (COUNT(*) as ?n)
    {session.graphs}
    WHERE {{
      ?_ a ?t
    }}
    GROUP BY ?t
    """)
  print('Classes: ', len(results))
  nodes = {}
  for result in results:
      t = urlparse(result["t"]["value"])
      n = result["n"]["value"]
      if not session.has_type(t, CLASS):
        continue
      nodes[t] = n
  return nodes