How many {time of discovery or invention} are for {Halley's Comet} ?
Halley's Comet was discovered on what date?
When was Halley's Comet discovered?
SELECT ( COUNT ( ?c ) AS ?n ) { resource:Halley's_Comet property:time_of_discovery_or_invention ?c }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q23054> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P575> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q23054 wdt:P575 ?obj }
1