Why the Number 21 in the 21 Gun Salute?

The Britons did a seven shot salute but at the time it became an important function in America there were twenty one states. That is why 21 is the number.