The first judiciary act was passed in 1789 when the Supreme Court itself was set up, and it established six as the number of members. In the earliest court structure, the number of justices corresponded to the number of judicial circuits. The Judiciary Act of 1789 established three circuit courts for the new United States, and each circuit would be manned by two Supreme Court judges who would ride the circuit for part of the year, and be based in the then-capital of Philadelphia the rest of the time.
After Thomas Jefferson won the controversial election of 1800, the lame-duck Federalist Congress didn't want him to be able to select a new judicial appointment. They passed a new Judiciary Act, reducing the court to five after the next vacancy. The following year, Congress repealed that Federalist bill and returned the number to six.
Over the next century and a half, as circuits were added without much discussion, so were Supreme Court members. In 1807, the number of circuit courts and justices was set at seven; in 1837, nine; and in 1863, the 10th circuit court was added for California and the number of both circuits and justices became 10.
https://www.thoughtco.com/how-many-supreme-court-justices-are-there-104778