How many {spouse} are for {Rezā Shāh} ?
To how many people was Reza Shah married?
How many spouses did Rezā Shāh have?
SELECT ( COUNT ( ?q ) AS ?v ) { resource:Reza_Shah property:spouse ?q }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q182921> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q182921 wdt:P26 ?obj }
4