According to http://web.mit.edu/catalog/degre.engin.ch6.html there are 48 units of unrestricted electives out of the 180-192 total units required. So about 1/4 of the units are free choice.
UCLA checklist is at http://www.seasoasa.ucla.edu/undergraduates/worksheets-all-majors/CS_2014-15_061814.pdf
I see a heck of a lot more than 20 required classes.
For Carnegie Mellon, see https://www.csd.cs.cmu.edu/education/bscs/currsequence_14.html 8 free electives over 4 years (eg 1 a semester) plus some other limited choice electives to satisfy requirements.