How many {base} are to/by {square} ?
A square has how many bases?
How many bases does a square have?
SELECT ( COUNT ( ?e ) AS ?l ) { ?e property:base resource:square }
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/P3263> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q164 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P3263 wd:Q164 }
18