Apple says that the maximum number of folders you can have on a single iPhone running iOS 4 is 180. Each folder contains up to 12 apps.
Folders on the iPad running iOS 4.2 can store up to 20 apps. Even under iOS 4.2, the iPhone has the same limit of 12 apps per folder.
Given those two numbers, a little multiplication tells us that an iPhone can hold up to 2160 apps. To do this, though, you must use folders, since each iPhone screen can hold 12 apps, but you're limited to 11 screens and thus just 136 apps (132 + 4 in the dock). For its part, the iPad can store over 4400 apps (220 folders of 20 apps each).

