How many {occupant} are to/by {Rijksmuseum} ?
How many works are contained within the Rijksmuseum?
How many works are occupied in the Rijksmuseum?
SELECT ( COUNT ( ?s ) AS ?w ) { ?s property:occupant resource:Rijksmuseum }
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/P466> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q190804 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P466 wd:Q190804 }
12