How many {medical condition} are for {Demi Lovato} ?
Demi Lovato has how many medical conditions?
How many medical conditions does Demi Lovato have?
SELECT ( COUNT ( ?p ) AS ?z ) { resource:Demi_Lovato property:medical_condition ?p }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q41173> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1050> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q41173 wdt:P1050 ?obj }
6