How many {residence} are to/by {Philadelphia} ?
What is the total number of residences in the Philadelphia area?
How many residence are by Philadelphia?
SELECT ( COUNT ( ?y ) AS ?c ) { ?y property:residence resource:Philadelphia }
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/P551> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q1345 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P551 wd:Q1345 }
328