The myth that we have to drink 8 glasses a day stems from a study that was published in 1974. It is true that they recommend a subtantial water intake each day, however, this may come from water, caffeinated drinks and even food such as fruit and veg.
"How much water each day? This is usually well regulated by various physiological mechanisms, but for the average adult, somewhere around 6 to 8 glasses per 24 hours and this can be in the form of coffee, tea, milk, soft drinks, beer, etc. Fruits and vegetables are also good sources of water." From the original study (
"Drink at least eight glasses of water a day." Really? Is there scientific evidence for "8 x 8"? -- Valtin 283 (5): 993 -- AJP - Regulatory, Integrative and Comparative Physiology)
Veg like cucumber is mostly water, so it will replenish your water stored. Also, how much you need to take in depends on how much goes out (e.g. sweat), so more when it is hot or you are doing physical work.
So go by the advice of just making sure your urine is pale in colour and if you get thirsty, you have left it too late and need to up your intake.
What water or other fluids is good for, diet wise, is making you feel a little fuller for longer, so may help reduce your food intake a little.