I guess they go hand in hand really, though for me I think mainly about counting calories whilst being mindful of eating a well balanced diet.
I few years ago I had an injury to my lower back (bulging disc, siatica, etc.) and over an 18 month period, through lack of exercise and comfort eating, I put on a little over 2 stone in weight. After some yo-yo dieting and trying various fads, I decided to go back to calorie counting.
Basically I cut out chocolate and biscuits, cut my bread and potato intake in half, ate more fruit and vegetables, and made sure I was taking in a little under 2000 calories per day. That combined with moderate exercise 4 to 5 times per week allowed me to lose 2 stone in only 4 months.
So for me counting calories whilst being mindful of a balanced diet works best of all. Never did I go into any more depth. Doing it this way allowed me to have those occasional treat and even the odd glass of wine or two on the weekend.
But I guess if you ask a hundred people you'll get a hundred different answers. At the end of the day, it's what ever works for you. And for me, having tried many diets, counting calories worked the best.