How many {official language} are to/by {Danish} ?
How many official languages does Denmark have?
What is the number of official languages that are Danish?
SELECT ( COUNT ( ?i ) AS ?p ) { ?i property:official_language resource:Danish }
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/P37> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q9035 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P37 wd:Q9035 }
12