Quite a lot, actually, but not all.
https://www.ncbi.nlm.nih.gov/m/pubmed/15216564/
“Swim diapers of all three brands exhibited an approximately equal fine-solids retention capability of about 98 to 99 percent over 30 minutes of water immersion activity. Conventional disposable diapers invariably fell down or came apart during the experiments, resulting in very limited solids retention. This study indicates that commercially available swim diapers represent a vast improvement in reducing the potential for fecal material release in public pool facilities, but that some release will still generally occur with these products.”
In my case, my child's doctor recommended taking him to a pool as therapy for his motor skills because of developmental problems. He was still over a year away from being potty trained. I researched and ordered 2 or 3 different swim diapers and tried to find the one that fit the best.
During this time I noticed that most brick-and-mortar stores only carry 1 or 2 kinds and I'm sure parents going to the pool on summer vacation won't have the patience I did. Which is why I was curious about this study. It reminded me that condom use is 98% effective, but under typical use is 88-90%. I can easily see the same thing happening with swim diaper effectiveness.
If you're actually concerned about public health and not just the ick factor, I would think young children would be completely banned in most pools or policies for dealing with feces would be more clear when it comes to licensing and regulation. This wasn't my experience working around pools years ago.
Seems like a special case that applies to 1 in 100,000. In most cases kids in diapers indeed ought to be restricted from public pools.