How many laps in a pool is 500 meters?

It takes 10 laps in an 50m Olympic size swimming pool and 20 laps in a 25m long swimming pool. A lap = a length. It's confusing because on a track, a lap is an oval path around the track back to the starting point. A pool is a straight line vs an oval on a track so when you travel it's entire length, you've gone a lap.