The Bible isn't too clear on this, but as near as I can tell, God starved everyone on earth so that Joseph could become the most powerful person in Egypt by interpreting the Pharaoh's dream so that God could get the Israelites enslaved by Pharaoh and then rescue them by sending plagues on the Egyptians. Or something like that.
OK. That all makes perfect sense. But what was the Pharaoh's dream?
Well, there were these seven fat, good looking cows that came out of the Nile, followed by seven skinny, ugly cows. The skinny cows ate the fat ones.
And it came to pass … that Pharaoh dreamed: and, behold, he stood by the river. And, behold, there came up out of the river seven well favoured kine and fatfleshed; and they fed in a meadow. And, behold, seven other kine came up after them out of the river, ill favoured and leanfleshed; and stood by the other kine upon the brink of the river. And the ill favoured and leanfleshed kine did eat up the seven well favoured and fat kine. So Pharaoh awoke. Genesis 41.1-4
Then Pharaoh had another dream. This time seven skinny heads of grain ate seven fat ones.No one could interpret Pharaoh's dream. So they called Joseph. Joseph said it was simple. God was going to send seven good years followed by seven years of famine. And the famine would be world-wide and "very grievous."
And he slept and dreamed the second time: and, behold, seven ears of corn came up upon one stalk, rank and good. And, behold, seven thin ears and blasted with the east wind sprung up after them. And the seven thin ears devoured the seven rank and full ears. And Pharaoh awoke, and, behold, it was a dream. 41.5-7
This is the thing which … God is about to do.…There come seven years of great plenty throughout all the land of Egypt: And there shall arise after them seven years of famine. … It shall be very grievous. … The thing is established by God, and God will shortly bring it to pass. 41.28-32Joseph said the Pharaoh should have the Egyptians store up food during the seven good years so they wouldn't starve (like everyone else) during the bad.
And it all happened just like Joseph said it would. The Pharaoh did what Joseph suggested and had Joseph oversee it all. And Joseph became the most powerful person in Egypt.
So things worked out well for Joseph, but not so well for everyone else.
When the famine struck, everyone on earth (including the Egyptians) had to buy their food from Joseph. If they couldn't make it to Egypt or didn't have enough money, they starved. It was all part of God's plan.
The seven years of dearth began to come, according as Joseph had said: and the dearth was in all lands … And the famine was over all the face of the earth … And all countries came into Egypt to Joseph for to buy corn; because that the famine was so sore in all lands. 41.54-57But how many people starved to death during God's seven year famine?
I have no idea. But since the Bible says it was “over all the face of the earth” and was a "very grievous famine," I figure it must have been at least 70,000 or so, 10,000 each year.
God's next killing: The seventh plague of Egypt: hail