Pretty much calorie count but you need to pay attention to your insulin level.
500 calories of sugar-heavy food have more of a negative effect than 500 calories of lean protein or fatty protein.
When your blood sugar spikes, the body releases more insulin, which prevents the fat cells from opening up and the stored glucose from being used for energy.
That is why high-sugar food is poison even if it is "low" in calories. Macronutrients are important.
"When you take insulin, glucose can enter your cells and glucose levels in your blood drop. But if you take in more calories than you need to maintain a healthy weight — given your level of activity — your cells will get more glucose than they need. Glucose that your cells don't use accumulates as fat."
So you do the opposite, take in fewer calories but also prevent your insulin from going up, which helps you burn the stored fat.
I didn't even bother with non-green colored vegetables, the redness of the fruit shows the level of fructose which is lower GI than production sugar but it has the same effect on insulin. Higher fiber foods are okay, but you need to check the balance.
Carbohydrates are complex sugar, which breaks down in the body to become glucose. Glucose is sugar and sugar spikes your blood sugar, which is not what you want.
Too much protein can also do this, but you'll need upwards of 200g per day intake for that process to occur, and is quite rare anyway.
So in summary:
Count calories, maintain caloric deficiency.
Lay off sugar, even fructose should be consumed in moderation.
Frequency is up to you, eat after workouts so you don't spike blood sugar before and make your workouts less effective on body fat.
Losing weight is a chemical process, which means your diet is 80% of the effort.
Consistency is key, cheat days are not worth it.