the last Trek 800 (2003) was only a 21-speed, so it's likely yours is the same (or possibly an 18-speed).
it probably wouldn't make much sense to upgrade to a 9-speed rear - at a minimum, you'd probably be looking at $250 or so in parts, which is more than a new bike in the same class as yours would cost. a new Trek 820 (closest thing to the 800) lists for $240...
if it works, ride it! and don't worry about upgrading - you'd be better served saving your money, fixing it when it breaks, and buying a new (better) bike later...