Counting extensions of function fields geometrically