Pretty much, it's only calories that matter in terms of gaining/losing weight. You can eat "healthy" food regularly, but still be obese without any muscle mass if you simply eat too much and therefore exceed weekly calorie limit.
I grew up as an obese kid and my parents would regularly serve me chicken/turkey breasts, a lot of greens, tomatoes, cucumbers and stuff like that, but my portion control was whack. When I started going to uni, I discovered what calories are and basically went from obese to normal weight in a matter of 6 months. Calorie counting simply helped me limit my portions, whilst ironically I was out drinking alcohol and eating a couple slices of pizza and a small bag of crisps for a few months straight.