How many {relative} are for {Mary, Queen of Scots} ?
Who were Mary, Queen of Scots relatives?
How many relatives did Mary, Queen of Scots have?
SELECT ( COUNT ( ?e ) AS ?d ) { resource:Mary,_Queen_of_Scots property:relative ?e }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q131412> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1038> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q131412 wdt:P1038 ?obj }
3