Simply, you need to define the criteria for buried and surface water around protein or ligand molecules. For instance, water molecules at or closer than 3 A from protein surface are considered buried and between 3-8 A are considered surface water molecules. These numbers are arbitrary, please consult literature how people defined these aspects.
Once defined, simply count the number of water molecules using MD engine tools that you used to run simulation. GMX and AMBERTOOLs both can do it natively. Good luck.