Last thing to be aware of is the derailleur maximum sprocket capacity, a really old mech might not clear an 11-42t cassette for example. Usually the specs are conservative though so you can go a few teeth over what Shimano recommend. If you need a really big cassette you can get one of the Wolf Tooth RoadLinks.
Edit: for a wide cassette I bought this 11-42t. Cheapest one I found but not exactly light.
Yep, sounds correct to me! I refer to this usually: http://blog.artscyclery.com/science-behind-the-magic/science-behind-the-magic-drivetrain-compatibility/ - all you need is the derailleur pull ratio matching shifter pull ratio, number of gears on the shifter matching number of sprockets on the cassette (obviously!). So 10-speed Shimano with 9-speed MTB derailleur should work great.
Last thing to be aware of is the derailleur maximum sprocket capacity, a really old mech might not clear an 11-42t cassette for example. Usually the specs are conservative though so you can go a few teeth over what Shimano recommend. If you need a really big cassette you can get one of the Wolf Tooth RoadLinks.
Edit: for a wide cassette I bought this 11-42t. Cheapest one I found but not exactly light.