How many {named after} are to/by {Soviet Union} ?
Give me the number of countries renamed after the fall of the S.U.
How many countries have been renamed after the collapse of the Soviet Union?
SELECT ( COUNT ( ?q ) AS ?d ) { ?q property:named_after resource:Soviet_Union }
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/P138> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q15180 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P138 wd:Q15180 }
6