Rear derailleurs aren't really finicky with different speeds. The thing is, your freewheel size determines your speeds. The derailleur can be adjusted for all speeds, really. For example, I have a Campy derailleur from the 8 speed era being used on a 10 speed cassette with a triple in the front.
Here's one method for chain length:
http://bicycletutor.com/calculate-chain-length/