How many IDE devices can you have?

Short answer: Four

A much more precise answer: The IDE standard allows for two devices to share a single IDE channel. The most common configuration is for there to be two IDE channels on the motherboard, allowing for a total of four devices. It is possible however, to add more IDE channels, usually in the form of PCI add-on IDE controller cards and have literally dozens of IDE devices in a single computer system.