How many {encodes} are to/by {L-Alanine} ?
Which is the number of the encodings done by L-Alanine?
How many encoded are done by L-Alanine?
SELECT ( COUNT ( ?d ) AS ?c ) { ?d property:encodes resource:alanine }
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/P688> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q218642 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P688 wd:Q218642 }
4