Do your best. I used a free app called Baritastic to track my food. The pre-op is mainly to make you aware of your food choices, to examine your relationship with food, teach you nutrition, and for you to gradually stop bad habits.
You have to look at how you use food - are you hungry or bored, anxious, stressed, etc so you can change from using food to solving those issues to solving them without food. It's hard, but your head needs fixing first or you will resort to these behaviors after the surgery. Stopping junk carbs will keep the cravings down, if you keep going back to them it just starts all over again. Give up one thing each week and build on that - I quit soda 1st thing - none, not even diet. Then - no fast food - none, zero. Then gradually let go of starchy carbs - no rice, etc.
You may lose a few pounds, or stay the same. The most important thing is to realize food is just food, it will always be there, there is plenty of it, you will have a bite or two of your favorite foods during maintenance. This diligence is forever. You can do it.