Magnetic Rotating Solutions in Gauss-Bonnet Gravity and the Counterterm Method