As many as you want (with moderation, of course) as long as they are the right carbs for you. I don't count carbs at all and continue to lose weight. I don't eat simple carbs, and that is about my only rule. I eat a very wide diversity of plants through the week. It can take some experimentation, but once you find a balance that works for you, the carbs don't matter that much. Obviously, if you are getting carbs from bread, pasta, rice, that can go south pretty quickly, but veggies, whole grains (not bread) beans (lots of beans) and such are generally good.
The combination of foods that I eat or what someone else eats may not work for you optimally, which is why a wide diversity of foods can really help because it covers all the bases without overdoing it in one particular area or food. That's my perspective.
I'm not saying it's the best way, but the way that is working for me. There isn't a single diet that will work for everyone, but in general more diversity is better. Unprocessed foods are better. Staying away from simple carbs is better Those things can be a part of almost any "diet" so if you want to subscribe to low carb, that's cool, but try to eat a diverse amount of plants that are low carb. If you want to eat carnivore, fine, but try to work in lots of herbs, seasonings, etc (they are plants to). If you want to eat low fat or vegetarian or vegan, fine, stay away from simple carbs.
Basically, we are trying to keep our bodies from spiking glucose and insulin that will promote fat storage. One person may get a glucose spike from corn, the person next to them may not. Tracking blood glucose while experimenting with foods can be a way to track how you respond to certain foods, but I know that is a pain (unless you get a continuous blood glucose monitor).
Sorry...rambling...just don't get drawn into a diet that has strict rules...find out what works for you.