He divorced her for a third time because he thought that she had been spying on him, but the second divorce came during a period of purity when he had had intercourse with her
Question

                At the beginning of my marriage, there was a problem between me and my husband; we argued and he said: You are divorced.

Sometime after that there was another problem, and this time I remember it vividly, because one week after my monthly period we had intercourse twice, then six days after that, because of the mother, there was a very big problem and he said to me: You are divorced. One week after that my period should have come, but it did not come. I told my husband and he took me to the doctor, and when we went there she told me that I was pregnant.

The last time, my husband and I were sitting down for lunch, then we went to rest. In the bedroom his mobile phone rang but he did not answer it. Then it rang again and he went out of the room and shut the door, and went to the sitting room. When he had finished talking and came back to the room, he wanted to go out. Then I had some doubts about my husband, and when he came back I said to him: Where are you going? He said: I have work. I exploded at him and said to him: I followed you to the sitting room and I heard who you were talking to!

He went crazy and what I said shocked him. He said: How dare you spy on me after all this kind treatment! Did you come to listen out from behind the wall and spy on me? You are divorced!

As soon as I heard these words I collapsed and I swore by Allah that I never came out and I never heard anything of the conversation. I swore on the book of Allah that I did not do that. After checking with other household members and becoming certain that I had not come out and that I was telling the truth, he calmed down and said: I swear by Allah that if I had not been certain that you are innocent, I would not have forgiven you. I said to him: Why did you divorce me this third time?

He said to me: No, this is the second time. I said to him: But I am certain, and I reminded him of the time when we had that problem and that one week afterwards I had gone to the hospital and they told me that I was pregnant. He got angry and said: I remember that problem but I am sure that I did not divorce you; I only threatened to divorce you. Anyway, who is the one who issues the divorce, is it me or you? I know what I said, and you do not know more than me!

Is it true to say that the second divorce does not count as such because it came during a period of purity in which he had intercourse with me? What is the ruling on the last divorce?

What should I do? No one knows my situation except Allah. I do not want to leave my husband and my house and my children. By Allah I am suffering a great deal at every moment. Please note that the mufti appointed by the government told me that there is no problem in me following those who say that the innovated divorce (talaaq bid‘i) does not count as such.
Praise be to Allah.
    Firstly: 

    If a man 
    divorces his wife during a period of purity in which he had intercourse with 
    her, it is an innovated divorce (talaaq bid‘i), and does not count as a 
    divorce according to the correct scholarly opinion. Please see the answer to 
    question no. 106328. This applies so long as the 
    matter has not been referred to a shar‘i court which ruled that the divorce 
    does count as such, or so long as the husband who issued the divorce had 
    consulted a scholar who issued a fatwa saying that the divorce counts as 
    such, then he acted on the basis of that fatwa and counted it as a divorce. 
    In such cases he does not have the right, after issuing another divorce, to 
    have second thoughts about the previous divorce. We have discussed this in 
    the answer to question no. 158115. 

    Secondly: 

    If a man 
    divorces his wife for a specific reason, then it becomes clear that this 
    thing did not happen, his divorce does not count as such, according to the 
    more correct opinion – for example, if he believed that she was spying on 
    him, so he divorced her, or he heard something bad about her, so he divorced 
    her, then it became clear that she was innocent of that. This has been 
    discussed previously in the answer to question no. 36835.

    Based on 
    that, if your husband only issued the third divorce because of your spying 
    on him – as he thought or believed – then it became clear that you were not 
    spying on him, this divorce does not count as such.

    Your 
    husband has to fear Allah, may He be exalted, and refrain from uttering 
    words of divorce.

    We ask 
    Allah to set your affairs straight and reconcile your hearts.

    And Allah 
    knows best.