How many {has effect} are to/by {cancer} ?
Cancer has affected how many people?
How many have been affected by cancer?
SELECT ( COUNT ( ?a ) AS ?u ) { ?a property:has_effect resource:cancer }
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/P1542> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q12078 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P1542 wd:Q12078 }
7