I'm not very familiar with gromacs, but if you find and run an RDF analysis of water around the protein, this information is included in the output for other softwares. Otherwise, integration of obtained binned number densities should provide this information
Maybe there are other tools as well? the "-surf" option seems to be one alternative (http://comments.gmane.org/gmane.science.biology.gromacs.user/34093)
Otherwise, I think VMD has a routine for RDF analysis and coordination determination? You should be able to load you trajectory there and perform the analysis.
Of course, g_hbond or gmx hbond (in the actual version) let you do it. You can see the options with the flag -h. The flag -r let you change the distance donor-acceptor heteroatoms, and 3.5 A is the default. If you include the -n index, you can choose the two groups that you want to evaluate, even water or whatever you want.
I am sorry, but I read hb as a mistake. I agree with Gustaf, g_rdf is a better option, also you can evaluate g_select which has a lot of options to work with, but it depends on your selection. For example, you can put on your selection: 'res_com of resname SOL and within 3 (or the cut-off you want) of protein' , under the flag -select, I mean.