I figured a part of it out, now i just need to figure out how to log it using logging.info, if anybody has any ideas I'd appreciate it, thanks
def my_function():
global call_count
call_count += 1
# Example calls
def test():
try:
location = pyautogui.locateOnScreen('1.png', confidence=0.9)
if pyautogui.locateOnScreen('1.png', confidence=0.9):
print(call_count)
except pyautogui.ImageNotFoundException:
pass