How many {country for sport} are to/by {San Marino} ?
What is the number of sports in San Marino?
How many types of sports are in San Marino?
SELECT ( COUNT ( ?e ) AS ?h ) { ?e property:country_for_sport resource:San_Marino }
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/P1532> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q238 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P1532 wd:Q238 }
103