In many states (if not all), new pools require an alarm which has to make a very loud noise whenever it is armed, and detects someone/something entering the pool. They can generate false alarms (mine does), but I am guessing that higher end units might be more accurate, and could be used reliably as an occupancy sensor. Only other thing I can think of is a CCTV camera with motion detection.