How many {lake inflows} are to/by {Irtysh river} ?
Into how many lakes does the Irtysh river flow?
how many lake inflows does the irtysh river have?
SELECT ( COUNT ( ?s ) AS ?k ) { ?s property:inflows resource:Irtysh }
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/P200> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q128102 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P200 wd:Q128102 }
4