How many {educated at} are to/by {lawyer} ?
What is the number of course needed to be educated as a lawyer?
How many courses do you need to be educated as a lawyer?
SELECT ( COUNT ( ?h ) AS ?l ) { ?h property:educated_at resource:lawyer }
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/P69> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q40348 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P69 wd:Q40348 }
5