Exactly. It's actually really hard to compare achievements when you're not comparing like for like. Swimmers have always won more events than athletes mainly because there are so many more events available to them that are similar enough such that the best ones are able to be the amongst best in each type. For someone like Usain Bolt, he can only do the 100m, 200m and the relay. Or rather he could only be any good in those ones. Sometimes sprinters do the long jump too although not very often. And the 2 that have been good at it in recent times have been drugs cheats anyway.
So who is to say x medals in swimming is better than y medals in athletics or the other way round? Who is to say Bolt wouldn't have also won the 100m, 200m and relay all running backwards or sideways or the 100m and 200m half backwards, half forwards like a medley?
There aren't enough similar events for an athlete to be able to win as many medals as a swimmer so maybe comparisons are not all that easy. Runners can usually do 2 or 3 events but for everyone else, there's only 1. In swimming, even your average no hoper (in terms of medals) could take part in 4 or 5.