Then yeah, it's cardio. One of the best ones, too. The only thing is, to challenge yourself, you should be doing other styles, like butterfly. And even if you do stick to freestyle, your workouts ought to be challenging in themselves, like increasing your pace, practicing sprints (like doing HIIT), or varying your breathing. I say this because there should be no doubt as to whether or not swimming laps is cardio or not. You should inequivocally feel that it is a good cardio exercise.