In the beginning, there were zero humans. Then 2 were created on the sixth day. After the fall, they had two sons, bringing the world population up to 4. Then one son killed the other, so it went back down to 3. This all happened at some time before the world’s 130th year (which is when the replacement son was born).
That’s what the Bible says, anyway. In reality, the world population around 4000 BC was probably at least 7 million.
After that, the Bible doesn’t tell exactly how many people there were. So I’m going to have to make some rough estimates to get an idea of how many people there would have been by the time of the flood. Here’s what we know (based on the numbers given in Genesis 5):
There were 11 generations in the 1,656 years before the flood, with an average of 165 years between generations. Each new generation includes “other sons and daughters” in addition to the son the Bible focuses on. So let’s assume each man had at least three sons. (I’d say that’s erring on the low side, considering the absurdly long lifespans, the polygyny, the lack of birth control, the fertility-valuing culture, etc.)
So we can keep adding the next power of 3 to get the approximate number of men alive after each new generation. By the 11th generation, there would be over 88,000 men. Then double that to account for the women.
(After around 847 years (the average pre-flood lifespan), people would start dying at a rate that increases exponentially with each generation, the same way the births did. That’s 809 years (or five generations) of people gradually dying off before the flood comes. But that only amounts to 242 or so dead men and women, which doesn’t make a significant difference to the number of people who survived until the flood. We can pretty much ignore the pre-flood deaths.)
So, the total population before the flood would be over 176,000. Or more, if each person had more children than what I estimated. The population after the flood: 8.
Based on Genesis 10, it looks like each man had an average of about five sons after the flood. And based on Genesis 11, there were typically around 35 years between generations after the flood.
So starting with three still-reproducing men, and adding five times the number of men in the previous generation every 35 years, we get: 3 + 15 + 75 + 375 + 1875 + 9375 + 46,875 + 234,375 + 1,171,875 + 5,859,375 + 29,296,875 = 36,621,093 men by the time Abraham is having children.
(After nearly everybody dies in the flood, the Bible doesn’t report anyone else dying until about 340 years later. Since Abraham has his first son only about 40 years after that time, the number of people who died by then could be quite low, maybe in the double-digits. So again, the deaths don’t make a significant difference to the numbers here.)
Doubling the number of men to account for the women, there could be up to 73,242,186 people by the time Abraham had children. Or less, if more people had died by then. Anyway, that should be plenty of time for the population to catch up with the actual historical levels.