Water isn't your only concern
To hydrate properly it's important to restore water and electrolytes. Especially if you're doing strenuous exercise in a hot environment where you sweat a lot.
Electrolytes are important to replenish because, if you don't you can become water drunk and potentially die.
By electrolytes I mean salt and potassium. Gatorade is a popular sports drink because it replenishes not only water but also salt and potassium (even if it does have too much sugar). You can find other powder mixes to replace electrolytes such as Emergen-C elector mix or you can make your own with salt and mortens diet salt (which is pure potassium). Google around to find the correct ratios.
Dehydration usually starts rearing it's ugly head with an irritable personality and headache followed by light-headed-ness. If you get that far you're in trouble and should do everything you can to find a source of water to drink.
It's not only how much you drink but how you drink
It's also important to sip water when you drink it. If you drink too much too fast your body doesn't have the time to properly absorb so you urinate a lot of it out. I always hear people use the 8 glasses as a hard and fast rule. If you chug 8 glasses of water a day you aren't necessarily gaining the benefits. Plus, how much water you require depends largely on your environment. Too much in a cold environment will make you pee a lot because your body is conserving the energy that would otherwise be wasted warming excess water in your bladder. To little in a hot environment and your skin won't be able to perspirate properly leading to heat exhaustion and dehydration. Way too much in any environment and you could die.
Sometimes dehydration has less to do with water and more to do with what else you drink
What most people don't realize is that coffee, tea, and anything containing caffeine are diuretics. A diuretic is basically a compound that makes you urinate a lot and thus lose more water mass than you would normally.
Here are the hard and fast rules I was taught by my wilderness instructors before a 25 day pack hike across the Superstition Wilderness (desert) and Tonto National Forest (desert) that I have lived by for over the past 9 years.
If you're healthy and don't suffer from any adverse conditions (like asthma) exercise should feel good (maybe difficult but still good). If you feel any sort of ache or pain, drink water. If you're in a bad mood, drink water. If you feel at all abnormal or there is anything wrong with you, drink water.
You are made from water and water cures everything (within reason). Sip it so you don't waste it and don't take it for granted and you'll be alright.
Also, don't forget your electrolytes. Even if you get them from munching on a few dehydrated banana chips.