How many {position held} are to/by {lieutenant general} ?
What is the total number of ranks that the Lieutenant General has accomplished?
How many position held are by the lieutenant general?
SELECT ( COUNT ( ?j ) AS ?p ) { ?j property:position_held resource:lieutenant_general }
SELECT (COUNT(?sub) AS ?subs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sub .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q152951 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P39 wd:Q152951 }
19