Question: What is the number of Massachusetts counties that are located in the United States state that has Bristol County in it (the one that has New Bedford in it)
Choices: 10
11
12
13
14
15
16
17
18
19
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Massachusetts" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "state of the United States" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "Bristol County" . ?e_3 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_3 <pred:name> "New Bedford" .   }
Program:
function: Find
inputs: New Bedford
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Bristol County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: state of the United States
function: Relate
dependencies: 5
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 6
inputs: county of Massachusetts
function: Count
dependencies: 7
Answer: 12