Count Gustaf Douglas, 3rd Count of Skenninge and Stjernorp - Swedish count, military and civil servant