How many {terminus} are to/by {Vienna} ?
how many vienna in terminus
How many terminus are in Vienna
SELECT ( COUNT ( ?p ) AS ?b ) { ?p property:terminus resource:Vienna }
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/P559> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q1741 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P559 wd:Q1741 }
6