How many {sports discipline competed in} are to/by {foil} ?
What type of sports competition uses foil?
Foil is used in what type of sports competition?
SELECT ( COUNT ( ?o ) AS ?i ) { ?o property:sports_discipline_competed_in resource:foil }
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/P2416> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q471447 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P2416 wd:Q471447 }
5