Actually a military coup is impossible in most civilised countries, because in properly functioning nation states, the state owns the military, not the other way round. Most countries have an army, but in some cases, the army has a country. Only in the latter scenario will coups take place.
The funny thing is, for people in places that fall under the first category, it is ridiculous to think of the military governing the country. And in places that fall under the latter category, people almost expect the military to do just that, and wonder why other militaries don't do that.
Thats why the army charging in and evicting the government and ruling the country is unthinkable in countries like India or france or britain or new zealand or australia or japan or canada or, as I said earlier, in any properly functioning nation state. Unfortunately, some countries were not formed on the basis of a proper identity, but were invented as an artificial entity, and the democratic tradition of people ruling themselves, and maintaining an army to protect their interests, never took root. In such places, which were artificially created, with no "boots on the ground" (and by boots i mean a proper political class that works among the people and comes from the people), the people with guns (power) control others. In such places, the people have to obey the diktats of whoever has guns.
Now in India we respect the military because it is a fine, professional warfighting force. Just because they are excellent at what they do, it is ridiculous to expect them to be good in other activities, like governing the nation. That should be left to people who's job it is to govern. There are many professionals who are good at doing what they do - doctors, engineers, IT people, singers, film directors, actors, journalists. But just because they are good at what they do doesnt mean that we expect them to get into the work of running the country. (They can individually get elected if they want to, but they as a whole cant take over governance.) So just as it is ridiculous to expect or ask the surgeons to conduct a coup and start running the government, it is ridiculous to ask or expect the professionals of the armed forces to do that.
Just because you are dissatisfied with governance doesnt mean you ask people of another profession to take over that profession on masse. Nobody wants all the doctors to do a coup and take over governance, right? Thats exactly why you shouldn't ask or expect professional militarymen/women to do it either. Let them do their profession. Governance is not going to be any better if they decide to take over executive and legislative functions - it is going to be as bad as it is now, with the added insult that they are doing it only because they have guns. In addition to all the ills that the political class have today (which by the way is not a lot worse than in many other countries), these people will also have the additional ill that they won't be accountable to the people. Which is why people should govern themselves, and raise a fine warfighting force to protect their interests, like we have done in India. Not have a bunch of guys with guns who rule people who dont have guns or military training - that is something that would only be acceptable to someone who has a slave mentality.
Our militarymen, like those of other functioning modern nation states, want to be warfighters/defenders, not slavemasters ruling and controlling powerless masses. I would say we are lucky.