If you onlyuttered the word of divorce (talaaq) on the second or third occasion becauseyou believed that it was obligatory, as you had been told, then this talaaqdoes not count as such according to the more correct opinion, because if aperson bases his talaaq on a reason, then finds out that that reason was notvalid, his talaaq does not count as such.
Shaykh Muhammadibn Ibraaheem (may Allah have mercy on him) said: We have received your letterin which you ask about your divorce (talaaq) of your wife and you said that youheard something about her and you got angry and divorced her three times(threefold talaaq), then after that you found that the news you had heard wasfalse and you became certain that it was not true, and you are asking whetherthis divorced counts as such or not, because it turned out that she is innocentof what was said about her.
Answer:
If the situationis as mentioned and you only divorced her based on this false news, then thecorrect scholarly opinion is that this divorce does not count as such. Based onthat, the divorce is invalid and your wife is permissible to you on the basisof the first marriage contract. There is no need to go through the process oftaking her back or do a new marriage contract.
End quote from FataawaMuhammad ibn Ibraaheem, 11/ question no. 3159
See alsoquestion no. 36835
The one who toldyou that made a serious mistake and spoke about Allah without knowledge.
For a woman whomenstruates, her ‘iddah is three menstrual cycles, not three months. Ifher husband gives her a revocable divorce and does not take her back during the‘iddah, she becomes completely divorced and is not permissible for himexcept with a new marriage contract.
As it has becomeclear that your second and third talaaq do not count as such, but you did nottake your wife back during her ‘iddah following the first talaaq, thenshe has become completely divorced from you and cannot go back to you exceptwith a new marriage contract that fulfils the necessary conditions.
And Allah knows best.