If AC voltage is not present, the display would randomly show any digit (0 through 9) permanently. If mains supply is available in the conductor, the electric field would be induced into the sensing probe. Since IC used is CMOS type, its input impedance is extremely high and thus the induced voltage is sufficient to clock the counter IC. Thus display count advances rapidly from 0 to 9 and then repeats itself. This is the indication for presence of mains supply. Display stops advancing when the unit is taken away from the mains carrying conductor. For compactness, a 9-volt PP3 battery may be used for supply to the gadget.
http://www.extremecircuits.net/2010/10/contactless-ac-mains-voltage-detector.html