Twice. The second time had to do with the Brits impressing US citizens to serve in their navy.
In fact, two songs have been written about that second war. The second song is “The Battle of New Orleans.” The first song has had greater impact, “The Star-Spangled Banner.”
Corrected