(Disclaimer: I am not a professional, so it might not be the most concise answer possible, but I did run the Python script and it works)
Answer:
user_input = input("What food do you have in your refrigerator? ").lower()
count = 0
while True:
if user_input != 'apples':
count += 1
print(f'You have a {user_input} with a total of {count} food(s)\\')
user_input = input("What food do you have in your refrigerator? ")
else:
break