if %bcount%>=5 pause ERROR: Boot count is exceeded! Press a key to reboot...
if %bcount%>=5 reboot
if not exist DONEMENU pause Boot Count is %bcount% - press a key to continue...
Note that if the user presses Ctrl+F8 it will increment the boot count. You can disable the Ctrl+F8 hotkey by adding:
to the end of your MyE2B.cfg file.
If testing using QEMU_MENU_TEST (run as admin).cmd then the file will not be updated when the QEMU session is ended (the file is snapshotted by QEMU). To avoid this snapshot behaviour, use QEMU F11 in RMPrepUSB or use VirtualBox+VMUB.