How much?
That really depends on your body. Every person has a different sweat rate, and while you can calculate how much hydration your body needs to perform at its best, variables such as air temperature and humidity are hard to factor into the equation.
A good rule of thumb is that you should want to pee. In Kona, at the Ironman World Championships, the medics like to say, "Pee by Hawi." This means that most athletes should want to pee by the time they get to the town of Hawi on the bike course.
Even during a sprint or Olympic-distance triathlon, you should feel the need to pee by the time you get to the run. If you don't, chances are you're not drinking enough.
More: Hydration Guide for Endurance Athletes
Stick to Your Race Plan
Did you know that most professional triathletes have a race plan? Long before the start of the race they've decided how fast and how hard to swim, bike and run.
So should you. Most newbie triathletes' race plans go something like this: swim, bike and run as hard as possible.
That may sound good, but it usually doesn't work so well on race day.
By the time you get to the triathlon run you should know both how fast you plan to run the course and what mile-per-minute pace you'll need to run to achieve that goal.
Stick to your race plan and you'll most likely finish. If you don't stick to your race plan you could risk bonking (running out of energy) or a DNF (did not finish) status.
The choice is yours, but I'd stick to the plan.
More: 6 Tips to Race Faster
Search for your next triathlon.