UC unit cap - 240 units

I am currently looking at double majoring, philosophy and pure math at UCSD. It appears I would be 5 units over IF, the lower division units taken in the summer prior to the first fall enrollment count towards the 240-unit double major limit. Does anyone know if they count? And if they do, does anyone know if I could essentially do a double major petition alongside a 240 unit appeal. The excess units are 20. And I have them, hypothetically, in 7 quarters.

Thanks to all that respond

Typo above, after recalculating, it would be 20 over. Not 5

http://admission.universityofcalifornia.edu/transfer/preparing-admission/transfer-credit says that only 105 lower division quarter units will be given transfer credit (all courses will count for subject credit).

Assuming that all of your transfer credit is lower division, do you plan to take more than 135 units at UCSD?