I'm pretty sure CP has had over 50,000 on a handful of occasions (that one halloweekend in 2003 jumps to mind) and crowds of 40,000 plus happen a few times every season. I never remember them closing their gates because they reached capacity.
When running well, the park's coasters alone can give some ridiculous number of rides in an hour (15-20,000 would be a good bet), not to mention all the flats and shows that can soak up a good number of people as well. Add to that the fact that the midways are very wide in most places and the park can really get to a fairly ridiculous number of people before it gets downright miserable.
Running out of parking and line for the bathroom are commonplace with numbers that high though.
I'd still prefer to visit the park when there are less than 20,000 though!