Some people may be including Washington, D.C., and Puerto Rico when counting the number of states. Neither of these are officially considered states.
Puerto Rico, located in the northeastern Caribbean, is an unincorporated property of the United States. It was acquired by the U.S. in 1898 through the Treaty of Paris after the Spanish-American War. U.S. citizenship was granted to residents of Puerto Rico beginning in 1917.
Washington, D.C., is the capital of the U.S., but it is not part of any state. Washington was declared a federal district under the Residence Act in 1790. It was created for the sole purpose of acting as the capital district for the country. Although land was donated by the neighboring states of Maryland and Virginia to form it, it is not a part of either of these states.