How many {material used} are to/by {walnut} ?
How many people use walnut material?
Walnut is a material used by how many?
SELECT ( COUNT ( ?o ) AS ?l ) { ?o property:made_from_material resource:walnut }
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/P186> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q208021 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P186 wd:Q208021 }
10