Most Trek 7 speeds are freewheel. 8-9 speed are cassette. You don't say what derailer you have, but most don't care how many gears you have. That's controlled by the shifter. Basically you'll need chain, cassette and shifter. You might need a new rear wheel.