As far as im aware, 1 ram reduces the walls hitpoints by 1.
so 20 rams will reduce hitpoints by 20. You can look at the wiki and it will tell you roughly how much total hitpoints a wall has (by adding up all the hit point values up till the walls level)
cats im still not sure. It may work in the same fashion, as my neighbour has tried countless times to destroy my academy with 20 cats, and since academy has roughly 500 hitpoints...Yeah. 20 cats still reduce a buildings level by 1-2 however depending on hitpoints...So i assume it is the same concept.