The number of states in the union has changed over time. The answer would be different depending on the date of the question, and it has changed quite a bit as the United States has moved through history.

At the end of the Revolutionary War (1775–1783), the original 13 colonies gained independence from Great Britain. There was much planning needed to establish a new government at this time.
The Second Continental Congress first drafted the Articles of Confederation and they were ratified in 1781. This was the first Constitution of the United States. According to the document, some of the things the Confederation could do included making war, negotiating agreements, and resolving land issues.
The Constitutional Convention then met in Philadelphia, Pennsylvania to replace the Articles of Confederation. They adopted the United States Constitution on September 17, 1787. At the time, in order to join the Union, a state had to ratify, or approve, the United States Constitution.
Delaware was the first state to ratify the Constitution and become a state on December 7, 1787. Pennsylvania and New Jersey quickly followed suit and at the end of 1787, there were three states in the Union.
Between January and July of 1788, eight more states joined. These were, in order of ratification:
Finally, by May 29, 1790, the remaining two of the original thirteen colonies joined: North Carolina and Rhode Island.
The answer to the question, “How many states are in the union?” gets easier for a long time. In the next 70 years, the Union more than doubled with the addition of 21 states.
During and after the Civil War, 14 additional states were added to the Union. This time in our history is called the Westward Expansion, and in 1912, our total was 48 states. Here are just a few of the major events which allowed the United States to grow.
Things got complicated when the Civil War began. The American Civil War was fought between 1861 and 1865. Seven states declared secession from the United States and formed the Confederate States of America. These were:
Within two months, four more states joined the Confederacy: Virginia, Arkansas, North Carolina and Tennessee.
The northwestern part of Virginia seceded from Virginia in 1863 and joined the Union as a new state called West Virginia. Nevada also joined the Union during the war. Tennessee and Louisiana were returned to Union control in the early part of the war. So, during the war there were 27 states in the Union.
After the war, there were 36 states in the Union. After the war, Nebraska was the first state to join the Union. By 1912, 11 more states had joined, bringing the total to 48. With the additions of Alaska and Hawaii in 1959, the United States had reached 50 states.
So if you want to know, “How many states are in the union?”, there have been 50 from August 21, 1959 to the present day.