How many {ethnic group} are for {Brazil} ?
Which is the number of ethnic groups that are in Brazil?
How many ethnic groups are in Brazil?
SELECT ( COUNT ( ?h ) AS ?d ) { resource:Brazil property:ethnic_group ?h }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q155> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P172> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q155 wdt:P172 ?obj }
5