If you’re seeking to lose excess weight, counting calories is usually less than helpful. In fact, focusing on calories could easily divert you from the real answer, which lies in optimizing your nutrition.
I’ve long advocated against counting calories. Even if you manage to shed a few pounds, you’re not going to get healthier by eating fewer cookies than you did before.
In short, if you really want to lose weight and improve your health, then you must replace empty calories and denatured foods with nutrient-rich ones.