As Dr. Eric Westman likes to say, “Calories are important, but we shouldn’t count them.” The point is that the body has mechanisms, hunger and satiety, to ensure that it gets enough food, and it can also compensate, up to a certain point, for how muich or how little we give it. This is why we argue against calorie counting and advise eating fat to satiety.
The basic biochemistry of this is that we want to keep our insulin level as low as possible, because high insulin causes the carbohydrate we eat to be stored as fat. Fat cannot leave the fat cells if insulin is too high. Hence we advise eating under 20 g of carbohydrate a day, to keep insulin low. We need a certain amount of protein, and there are bodily mechanisms to make sure we get enough, so just eat what seems a reasonable amount, and don’t worry if you get “too much.” Fat is the macronutrient that stimulates insulin secretion the least, so it is the safest source of calories. Replace the carbohydrate you are not eating with fat.
It’s impossible to lose excess fat unless insulin is low, but the amount of food we eat also has an effect. If we don’t eat enough calories, our body will grimly hang on to its fat store, for emergencies. Eating enough food (in the absence of carbohydrate, of course) convinces the body it is safe to part with that excess fat, so the key to losing weight is sometimes to eat more, not less. The body responds to caloric abundance by—among other things—increasing the basal metabolic rate, spending energy on growing hair and on the reproductive system, and by getting fat cells to “waste” energy by metabolizing fat themselves. The mechanism by which we know we’re not eating enough is called “hunger;” the mechanism by which we know we’re eating enough, “satiety.”
So keep carbohydrate under 20 g/day, eat a reasonable amount of protein (whatever that is for your situation), and eat fat to satiety. And keto on!