Didn’t all the Jews of the generation in Exodus all die out because of the golden calf? How could there be the same exact number a whole generation later?
As Alex shared this was the same generation: the first census was before the Tabernacle was built since the half-shekels used for the count were used for the sockets of the structure, the second was seven months later.
Still Artscroll picks up on the fact the numbers are similar and brings 3 opinions
- Rashi (Shemot 30:16) responds that for the purpose of the census, all men counted were those who were 20 years old on the previous Rosh Hashana; those who came of age during the year would not be counted until the next Rosh Hashana
- Mizrachi adds that this assumes that one of the many miracles that took place in the Wilderness was that no one died between the first and second census, since dead men were surely not counted
- Ramban (30:12) disagrees, contenting that people were counted on the basis of their birthdays, not by their age on Rosh Hashana. Furthermore, he contends that there was a basic difference between eligibility for the two censuses: in the first, the Levites were surely counted, but the Torah excludes them from the census in Numbers, so that Rashi's reasoning cannot explain the identical counts. Ramban contends that there were indeed many who died between the tallies, but those who came of age made up not only for them but also for the Levites, who were not included in the second census. That the two totals were identical was a coincidence
It was the same generation. As the verses in Numbers 1:1-2 say when introducing the count:
And the LORD spoke unto Moses in the wilderness of Sinai, in the tent of meeting, on the first day of the second month, in the second year after they were come out of the land of Egypt, saying:
'Take ye the sum of all the congregation of the children of Israel, by their families, by their fathers' houses, according to the number of names, every male, by their polls; (Mechon-Mamre translation, my emphasis)