Yes it was more than twenty, actually more like 4500-4800 million years.
And you're right! All the water would have evaporated, as a matter of fact, all water molecules in the worlds oceans have at some point or another been in the state of vapor rather that liquid.
But that's not a problem since the atmosphere can only contain a limited amount of water vapor. When the limit is reached any excess water vapor condenses and becomes liquid again.
This phenomenon creates clouds and fog!
Remember: clouds are made of minute particles of liquid water, not vapor.
If the condensation of excess water vapor is great enough, the water particles in the clouds will become too large to remain flying and will then fall to the ground
This phenomenon is commonly referred to as "rainfall"
Now it stands to logic that if water turns into vapor, and water vapor in turn turns into liquid water again, there must be some sort of balance between the two things. The amount of liquid water and water vapor must - when you view the whole earth - remain the same. The atmosphere absorbs a certain portion of water as vapor untill it's storage capacity is full. Any excess water vill remain as liquid on the earths surface
Since the amount of water molecules on the earth is far larger than the amount of water that can be stored in the atmosphere, liquid water must always be present.
And there you have it, that's why we have lakes and rivers and streams and oceans.
And this, by the way, is seventh grade physics. What grade are you in?