Ruling on khul‘ during menses; should the menstrual cycle during which the khul‘ occurred be counted?
Question

I was given a 2nd talaaq by my husband in January after I came off my menstrual cycle. I then started my iddah period. I did not have another cycle until March and then not again until last week. I spoke to an imam about my situation as my husband has been abusive and oppressive since the start of our marriage and advised I seek a khula, which my husband agreed to. I am confused because I was on my menses when he released me by khul and I was already going through my iddah from his talaaq. What is the status of my divorce? This is very stressful for me and I do not know what I am doing.
Praise be to Allah.Firstly: 
When a woman’s husband divorces her (talaaq), she should count three menstrual cycles if she is one of those who menstruate and she is not pregnant, according to scholarly consensus, because Allah, may He be exalted, says (interpretation of the meaning):
“And divorced women shall wait (as regards their marriage) for three menstrual periods”
[al-Baqarah 2:228]. 
But if the separation occurs as the result of something other than talaaq, such as khul‘ or annulment of the marriage, then she should observe ‘iddah for one menstrual cycle, according to the correct scholarly view. This has been discussed previously in the answer to question no. 5163. 
Secondly: 
If a man divorces his wife (by talaaq), and during her ‘iddah she asks for khul‘ and he responds to her request, it is valid, because she is still his wife. 
Ibn Qudaamah (may Allah have mercy on him) said: The woman who is revocably divorced (first or second talaaq) is still a wife and a subsequent talaaq (divorce), zihaar (a jaahili form of divorce in which the husband says to his wife, ‘You are to me like my mother’s back’), eela’ (an oath not to have sexual relations with one’s wife) and li‘aan (a procedure in which the husband formally accuses his wife of adultery and she formally denies the charge, and each invokes the curse of Allah upon him or herself if he or she is lying) are all valid; and one of them may inherit from the other, according to scholarly consensus; and if he separates from her by means of khul‘, his khul‘ is valid.
End quote from al-Mughni, 7/400 
The khul‘ is valid even if she is menstruating, because khul‘can only occur at the request of the wife because of what she is faced with of bad treatment on the husband’s part. So it is permissible for it to occur at the time of menses in order to put an end to harm (caused by the husband’s mistreatment). 
Ibn Qudaamah (may Allah have mercy on him) said: There is nothing wrong with khul‘ at the time of menses or during a period of purity in which the husband has had intercourse with her. The prohibition on talaaq at the time of menses is because of the harm that may affect the wife due to making the ‘iddah longer. But khul‘ is for the purpose of putting an end to harm that she is suffering because of bad treatment and staying with one whom she hates and resents, which is greater than the harm caused by making the ‘iddah longer. So it is permissible to ward off the greater harm by means of the lesser. Hence the Prophet (blessings and peace of Allah be upon him) did not ask the woman who separated from her husband by means of khul‘ about her situation, because the khul‘ that could lead to making the ‘iddah longer happened at her request, which indicates that she gave her consent and proves that it was in her interests. End quote from al-Mughni, 7/247 
Al-Baghawi (may Allah have mercy on him) said: Khul‘ at the time of menses or during a period of purity in which the husband has had intercourse with her is not bid‘ah (an innovation), because the Prophet (blessings and peace of Allah be upon him) gave permission to Thaabit ibn Qays to separate from his wife by means of khul‘ without knowing about her situation (regarding menses etc). Were it not that it is permissible in all circumstances, he would probably have asked about her situation.
End quote from Ma‘aalim at-Tanzeel, 8/148 
It says in al-Mawsoo‘ah al-Fiqhiyyah, 8/326: The majority of fuqaha’ – Hanafis, Shaafa‘is and Hanbalis – are of the view that khul‘ at the time of menses is permissible, because of the general meaning of the words of Allah, may He be exalted (interpretation of the meaning): “then there is no sin on either of them if she gives back (the Mahr or a part of it) for her Al-Khul‘ (divorce)” [al-Baqarah 2:229].
And because she has a need to put an end to her suffering by separating from her husband, as she is offering to give up wealth for that purpose. 
The Maalikis, according to their well-known opinion, are of the view that khul‘ is not allowed during the woman’s period. End quote. 
See also Badaa’i‘ as-Sanaa’i‘, 3/96; at-Taaj wa’l-Ikleel Sharh Mukhtasar Khaleel, 5/304; Mughni al-Muhtaaj, 4/498 
Once it is established that khul‘ at the time of menses is permissible, the woman who has been divorced by means of khul‘ does not finish her ‘iddah  when she becomes pure from the menstrual period during which the khul‘ occurred. Rather she must go through another menstrual cycle, then become pure and do ghusl; then her ‘iddah will have ended, because the period during which the khul‘ occurred was not a complete menstrual cycle, and ‘iddah has to be a complete menstrual cycle. 
Ibn Qudaamah (may Allah have mercy on him) said: The menstrual cycle during which she was divorced (talaaq) does not count as part of her ‘iddah, and there is no difference of opinion among the scholars concerning that, because Allah, may He be exalted, has commanded that she wait for three menstrual cycles, so it includes three complete cycles; the cycle during which she was divorced does not count because it is only part of a cycle. End quote. 
And Allah knows best.