add ag switching counter