How many {social classification} are to/by {boyar} ?
What is the number of different boyar social classifications?
How many different boyar social classifications are there?
SELECT ( COUNT ( ?k ) AS ?q ) { ?k property:social_classification resource:boyar }
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/P3716> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q203563 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P3716 wd:Q203563 }
10