Fix updating of function call stats

This should be

stats.FunctionEvals++
stats.GradientEvals++