While much has been made of a mayor who served a deployment in the middle of his term, there is a United States Senator who arguably has him beat.
According to a listing maintained by investigative reporter Sharyl Attkisson, Senator Lindsey Graham (R-SC) deployed to Iraq and Afghanistan 19 times from 2006 to his retirement from the Air Force Reserve in 2015. Senator Graham's deployments were often coordinated with Congressional recesses – enabling him to balance his duties as a United States Senator with his reserve duties.
Graham would often head over as part of a Congressional delegation, spend one or two days as a civilian, then he'd stay behind and serve for about a week (sometimes more) as a Judge Advocate General in the United States Air Force Reserve.
In a release by his Presidential campaign in 2015 after a Washington Post hit piece, some details of Graham's service in both Iraq and Afghanistan came to light. Army General David Petraeus and Marine General John Allen both noted that much of Graham's work was done on detainee policy. Both a former Judge Advocate General and Deputy Judge Advocate General praised Graham's service in the release.
The deployments came about because Senator Graham had to be transferred from an assignment to the Air Force's Court of Criminal Appeals — an assignment given in 2003, according to a release from Senator Graham's office — due to a claim made by an airman fighting charges of wrongfully using cocaine.
The ruling on the airman's appeal (the sentence of a bad conduct discharge, four months in jail, and a reduction in rank was upheld) after the Air Force Court of Criminal Appeals ruled that Graham wasn't required to recuse himself resulted in Graham's removal from the court. He isn't even listed as a past judge on a listing at the court's website.
Senator Graham was also a veteran of Desert Storm prior to winning election to the House of Representatives in 1994. He was first elected to the Senate in 2002, replacing Strom Thurmond. Graham retired from the Air Force Reserve in 2015 as a colonel, shortly before running for President, ending a combined total of 33 years of active-duty, reserve, and National Guard service.