How many {costume designer} are to/by {Pierre Balmain} ?
What is the number of costumes that Pierre Balmain has designed?
How many costumes has Pierre Balmain designed?
SELECT ( COUNT ( ?z ) AS ?w ) { ?z property:costume_designer resource:Pierre_Balmain }
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/P2515> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q551674 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P2515 wd:Q551674 }
15