ANY fluid- even coffee - counts towards this "2L a day" you do not need to imbibe 2L of water other than food and beverages in order to be adequately hydrated. The true test is as Sqad says, and simply whether you feel thirsty or not.
There is fluid in food. There is fluid in soft drinks, or milk, or tea, or coffee, and the amount of fluid you take in is far in excess of any mild diuretic effect that the coffee or tea might have...