How many {located on linear feature} are to/by {Canal du Midi} ?
How many things are there on a Canal du Midi linear feature?
How many things are located on a linear feature by Canal du Midi?
SELECT ( COUNT ( ?a ) AS ?z ) { ?a property:located_on_linear_feature resource:Canal_du_Midi }
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/P795> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q202494 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P795 wd:Q202494 }
18