Can a home security system be built with an arduino? (40 sensors maximum, usb interface to pc)
You should be able to do this easily enough if you equip one Arduino with an appropriate shield.  Take a look at something like MaceTech's Centipede Shield, which offers 64 GPIOs.



They provide a library that will make it easy for you to integrate the shield, and from the code samples it looks like you use I2C at 400kHz, though I assume the default is going to be 100kHz.

Not being an I2C expert, I can't tell you exactly how many I/Os you should be able to support at 100kHz.  However, my guess is that with 40 sensors, 2.5kbits (100kHz/40) is plenty of bandwidth for sending all of the I2C commands required to read a single sensor in one second.