Counting points on curves using a map to P^1 - Jan Tuitman (2014)