This item is from the Yet Another Enhanced IDE/Fast-ATA/ATA-2 FAQ, by John Wehman and Peter den Haan with numerous contributions by others. (v1.92).
For DOS and Windows you probably want BIOS support for all your harddisks. Older BIOSes support drives on the primary channel only, just two; newer ones add support for the secondary channel for a total of four. Few BIOSes support more than that; MR BIOS is an exception.
If the BIOS supports just two drives and you want more, there's a software solution available: 3drives (see the net.resource guide). Some interface cards also ship with the necessary support. Creative Labs has drivers for CD-ROMs on the tertiary and quaternary port.
Other operating systems such as Win95 and OS/2 support both primary and secondary interface without aid from the BIOS. Linux will support a nearly arbitrary number of interfaces; you'll have to pass kernel parameters to specify the ones beyond the first two.