what is the {series ordinal} for {Johann Wolfgang von Goethe} has {given name} as {Johann} ?
Give me the number of people who were in the lineage of Johann Wolfgang von goethe.
How many people were in the lineage of Johann Wolfgang von goethe?
SELECT ?d WHERE { resource:Johann_Wolfgang_von_Goethe property:given_name ?j . ?j property:given_name resource:Johann . ?j property:series_ordinal ?d }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5879> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P735> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q11122389> .
?statement <http://www.wikidata.org/entity/P1545> ?value. 
} 

SELECT ?value WHERE { wd:Q5879 p:P735 ?s . ?s ps:P735 wd:Q11122389 . ?s pq:P1545 ?value}