Magnus Stenbock (1663-1717), greve, fältherre