Presuming you don't need another hack in main.xml (let me know if so) here is the file.
This hack will count all pages flipped. It will reset the counter as soon as you connect the charger to the reader. If you connect the charger to the Reader while it is off you need to swtich it on with the charger still connected in order to reset the counter. As soon as the Reader is on you can remove the charger.
In other words: see the charger as a reset button that will reset the counter as soon as it is connected.
Let me know if it works for you.

Use at own risk!