How many {category combines topics} are to/by {Pereira} ?
What is the number of categories that combine topics of Pereira?
How many categories combine topics of Pereira?
SELECT ( COUNT ( ?u ) AS ?f ) { ?u property:category_combines_topics resource:Pereira }
SELECT (COUNT(?sub) AS ?subs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sub .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P971> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q51111 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P971 wd:Q51111 }
5