what is the {series ordinal} for {Guadalupe Victoria} has {position held} as {President of Mexico} ?
How many presidents preceded Guadalupe Victoria President of Mexico?
What number was Guadalupe Victoria President of Mexico?
SELECT ?m WHERE { resource:Guadalupe_Victoria property:position_held ?x . ?x property:series_ordinal ?m . ?x property:position_held resource:President_of_Mexico }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q311425> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q628004> .
?statement <http://www.wikidata.org/entity/P1545> ?value. 
} 

SELECT ?value WHERE { wd:Q311425 p:P39 ?s . ?s ps:P39 wd:Q628004 . ?s pq:P1545 ?value}