Excerpt from You’re Doing It Wrong: Dump the Myths, Misconceptions, and Bad Advice You Believe
Coffee is a diuretic; therefore, coffee dehydrates you; therefore, coffee doesn’t count toward your daily fluid intake and may actively subtract from it. Drink your water separately. The coffee doesn’t help.
The diuretic effect of caffeine is real. The dehydration conclusion is not.
Caffeine acts on the kidneys by blocking adenosine receptors that would otherwise promote water reabsorption — the result is mildly increased urine output. This is a genuine pharmacological effect, documented and not in dispute. The question is whether this effect is large enough to produce net dehydration when caffeine is consumed dissolved in water, as coffee is.
The answer is no, at typical consumption levels. A standard cup of coffee is approximately 98 percent water. The mild diuretic effect of the caffeine it contains does not increase urine output enough to exceed the volume of water delivered by the beverage itself. You excrete some additional fluid, but you consumed several hundred milliliters of fluid to get there. Net hydration is positive, not negative.
A 2003 study in the Journal of Human Nutrition and Dietetics examined the evidence on caffeine and hydration and concluded that moderate consumption of caffeinated beverages — up to about 400mg of caffeine per day, roughly four standard cups of coffee — contributes to daily fluid intake rather than detracting from it.
The dehydration concern may have more validity for very high caffeine intake, and for people who are not regular caffeine consumers — regular consumers develop tolerance to the diuretic effect. First-time or occasional high-dose caffeine consumption produces a stronger diuretic response than the same dose in a regular coffee drinker.

Your morning coffee is counting toward your hydration. The water-only rule has no practical basis at moderate intake.

