Thanks a lot for the help.
I have a couple more questions about calculating the number and lifetime of hydrogen bonds.
1) Is it possible to exclude the intra-molecular hbonds?
I calculated the hbonds by selecting each molecule separately and then counting the hbonds of this molecule with other molecule. This process excludes the intra-molecular bonds but I was wondering if there is a better way of doing it.

2) How can I get the number of hbonds as a function of time?