Alerting users with a pop-up window
You could change count = count + 1 to count += 1 besides that, do you need to repeat messageBox = ctypes.windll.user32.MessageBoxA so much? If it doesn't change, couldn't you just have it once? You could also add variables to shorten repeated lines like making a variable called resetMsgBox and have it be: resetMsgBox = ctypes.windll.user32.MessageBoxA so it's easier to read by having messageBox = resetMsgBox every line instead, I suppose.