You're right! They did lose the war and the idea that the Algerian War is the model for modern counterinsurgency tactics stems not from the war itself, but from a man whose formative counterinsurgency experiences were in the Algerian War (together with the French Indochina War) and who would later go on to write several books on it: David Galula.
What David Galula did was to summarize the French way of counterinsurgency and to build upon that with lessons that he himself took from the conflicts. There isn't actually anything revolutionary or innovative in his texts and the lessons and examples he brings up were all established elsewhere and actually carried out by other nations at the time of him writing. Galula's fame comes from the first wave of interest in counterinsurgency in the US, where Galula's contacts brought him to light in the US and where his texts were published in the early 1960's. His reputation got yet another boost in the last 10 years with the insurgencies in Iraq and Afghanistan and the second wave of counterinsurgency interest coming from the US (as well as General David Patreaus interest in him).
If I can add my own opinion in this, Galula is in many ways overrated (mainly because there really isn't anything new in what he's writing) and, as you pointed out, drew lessons from two conflicts that the counterinsurgency force lost in. There is also a lack of historical context given to those who reads his texts in modern day: Galula was writing it to show how to combat revolutionary warfare in a very specific context of the 1960's. While the Indochina War most certainly was a revolutionary war, the Algerian War certainly wasn't since the main ideology in the Algerian War was that of nationalism. This was something that contemporary French commanders had a hard time to grasp and many actually believed that they were fighting against communism.
This is not to say that what he has written down is not good lessons, but his writing is definitely not the model for modern counterinsurgency (nor is the Algerian War) and his lessons are of such general nature that there is difficult to find anything innovative in it beyond one thing: it was written during a particular time where a text like this was highly sought after (and revived again 40 years later) and an early text on how to combat revolutionary warfare. Most importantly, the text was accessible. It was easy and direct to understand and very suitable for a student to base a possible counterinsurgency challenge on. It's a neat little book in which lessons that had been drawn from his own experiences and those who came before him were summarized and easily digested. However, for any practitioner in counterinsurgency, it is wise to never base everything you do on a single book or theory - in particular if that individual fought in a war that was neither successful or showed any actual innovation to counterinsurgency (beyond the early use of helicopters!).
For more reading:
Galula in Algeria: Counterinsurgency Practice Versus Theory by Grégor Mathias.
Modern insurgencies and counter-insurgencies by Ian F. W. Beckett (for some overall background on the roots of counterinsurgency and what led to modern counterinsurgency).
Contemporary counterinsurgency theorists worth looking into:
Defeating Communist Insurgency: Experiences in Malaya and Vietnam by Sir Robert Thompson (one of the main strategists in the Malayan Emergency and was part of the British Advisory Mission to Vietnam)
Modern Warfare: A French View of Counterinsurgency by Robert Trinquier (a controversial figure, Trinquier was one of Galula's contemporaries in both France and the US)
Low Intensity Operations by General Sir Frank Kitson (Kitson served in a large amount of counterinsurgency operations and emphasized the importance of intelligence in counterinsurgency)
As a follow up question ,and after literally just finished watching"Battle of Algiers", I am wondering if anyone can give me a well-documented statistic of french military causalities in the conflict. Im finding it surprisingly difficult to find accurate numbers
In one of my military history classes, during the topic of insurgencies we were taught that the British suppression of the Malayan Insurgency is considered the model for counter-insurgency as unlike the Franco-Algerian war, the British were victorious.
The British pioneered several successful tactics, among them being "Winning the Hearts and Minds" of the people. Expecting a long drawn out conflict, the British focused on economic and political development of the local population within their controlled sectors. This led to the population sympathizing with the British efforts causing 2 effects: The locals became more resistant to the insurgents and were less likely to supply or assist them. The locals would actively help the British either by repelling insurgent attacks on their area or supplying the British with vital information about enemy movements. This tactic was highly successful and was a key part of the American strategy in Iraq.
I don't want to comment further because I don't have my notes or textbook offhand. Rather my intent was to point you in a different direction to learn more about the topic. I suggest you do a search on the "Malayan Emergency" or even post a new topic-question.