Don't do that! It's not like that every where. It's only like this around the city. If you go north or south of Rio I'm sure there are clean beaches. There are some beaches just north of where I live that are amazing, most beautiful beaches I've ever seen. Even the beach in the city I live in isn't bad, just some litter from people that visit the beach. I've been here for a year and a half and gone swimming a bunch of times, and haven't gotten sick once. Brazil is an amazing country that's definitely worth a visit. Just don't go swimming in Rio.
It more concerns me that they don't seem to properly test the water. Even if it's outside of Rio, I can't really be certain it's safe. I might go and just not go to the beaches though.