query: SELECT *
  WHERE
    {
      {SELECT ('number of director' AS ?indicator) (count(DISTINCT ?item) AS ?count)
      WHERE
      {VALUES ?filmtype {wd:Q11424 wd:Q24862 wd:Q20667187 wd:Q226730} . ?film wdt:P31 ?filmtype . ?film wdt:P57 ?item }
      }
    UNION
      {SELECT ('number of actors' AS ?indicator) (count(DISTINCT ?item) AS ?count)
      WHERE
      {VALUES ?filmtype {wd:Q11424 wd:Q24862 wd:Q20667187 wd:Q226730} . ?film wdt:P31 ?filmtype . ?film wdt:P161 ?item }
      }
  
    }