It's great exercise. It works your large muscle groups, provides good water resistance to work against, and because of the buoyancy, it's low-impact to your joints. At least thirty minutes of exercise in which you get your heart rate up into the working range for your age is ideal each day. So you'd have to swim laps, ideally, for 30 minutes or more. How many laps that'd be would depend on how fast you swam. Swimming's hard work. So you might have to build up to 30 minutes of it. You can do kicks and pulls, too, to isolate your legs and upper body in the water and target those areas.

I used to swim competitively as a teenager. I was never in as good shape as I was in the days when I was doing that, and I've always been fit and athletic.