Exercise is great for your health. But if you're looking to lose weight in the new year, you should know this: How much you eat ultimately matters more than how much you work out.

Like a lot of Americans, I've got some extra pounds to shed. So about two months ago, I started tracking everything I eat using an app called Lose It! It's one of several apps out there — like MyFitnessPal and MyPlate – designed to help you watch your diet. When I eat something, I can look up how many calories it contains in the app. If my food isn't listed, I add it myself.

Research shows that logging what you eat can be one powerful strategy for weight loss, says Dr. Yoni Freedhoff, an obesity medicine clinician and an assistant professor of family medicine at the University of Ottawa in Canada. Basically, logging becomes a food budget — and he says it's not that different from creating an actual financial budget.

"How many people out there have done this exercise from a money perspective and realized, 'Holy crap! I'm spending that much at Starbucks!' I think that similarly we might say that about the calories we're spending at Starbucks," Freedhoff says.

He says knowing how many calories you're consuming "may help in your decision-making in regard to what you can and can't afford or want" to eat. "But it also has benefits to behavior change. Every time you use a food diary, you're reminding yourself of all those behaviors you're hoping to change — and that, in turn, is a powerful way to encourage and sustain behavior change."

Freedhoff has his patients keep food diaries. And he says his patients who use apps are more likely to keep up with the logging than those who rely on pen and paper. It makes sense: Most of us are glued to our smartphones all the time anyway.

I use my app to track my weight and my exercise, too. After logging one 30-minute cross-training session with my fitness trainer, the app added an extra 340 calories to my daily food allowance. That sounds good in theory, but as registered dietitian Abby Langer notes, there is a limit to how much energy we can actually expend through physical activity – only up to 30 percent of what we eat (unless you're a pro athlete or have a job with similarly intense physical demands). And some people burn far less than that, perhaps as little as 10 percent, according to some research.

"So people who think that they can spend all day in the gym and just sort of negate all the food that they've eaten in terms of calories — that's just not how your body works," Langer notes.Keeping this in mind, I try not to eat most of the "bonus" calories my app gives me every time I work out.

On the other hand, Langer says some people can become dangerously fixated on counting calories.

"There are some people who are predisposed to becoming obsessed with tracking the calories and just all the numbers and number crunching," she says, adding, "If you have a predisposition or a history of an eating disorder, I would recommend staying very far away from these apps because it really can be triggering for people."

That said, as long as you take it with a grain of salt, tracking your meals in general can be really helpful for some people. Freedhoff points to one study from 2008 that found dieters who kept food records doubled their chances of success.

The data on food tracking apps so far is mixed. For example, a 2015 study found that young adults (ages 18 to 35) who used a smartphone app to track their calories, weight and exercise lost no more weight than people who simply got handouts on healthy eating and exercise.

Another study, from 2014, found that merely introducing a weight loss app to obese patients did not help them lose weight. But in that study, the person who used the app the most also lost the most weight — 29 pounds. The researchers concluded: "In the hands of a patient who is truly ready to self-monitor calories ... [apps] may be a useful tool for losing weight."

That has certainly been my experience. I've been extremely disciplined about using my app since November. And while the average American puts on about a pound during the onslaught of cookies and cakes that mark the winter holidays, I actually lost 6 pounds.