the 165 is clock dependant. In your book, does it say which crystal or oscillator frequency they are using? This is likely to be a different value if you are using 4mhz, 10mhz, 20 mhz crystal etc...
It is used to count us into ms timings.
Because this isnt a strict time dependant circuit or code, it doesnt really matter for you its probably best to just use what they say
(strictly speaking, you shouldnt need the timer delays anyway)
also this code will need editing for you, since there is only 1 sensor input for this. the code will only work if water is detected at the top level. and will halt at doing nothing forever otherwise.