How many {drug used for treatment} are to/by {thiamine ion} ?
Which drugs can help treat thiamine ion?
How many drugs used for curing {thiamine ion} ?
SELECT ( COUNT ( ?y ) AS ?v ) { ?y property:drug_used_for_treatment resource:β-amin }
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/P2176> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q83187 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P2176 wd:Q83187 }
5