How many {diplomatic relation} are for {Nigeria} ?
How many diplomatic relations is Nigeria in?
How many diplomatic relations has Nigeria engaged with?
SELECT ( COUNT ( ?g ) AS ?h ) { resource:Nigeria property:diplomatic_relation ?g }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1033> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P530> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q1033 wdt:P530 ?obj }
28