Praise be to Allah.
With regard to talaaq (divorce), it is the same whether the words are uttered in earnest or in jest, because of the report narrated by Abu Hurayrah (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “There are three matters in which seriousness is serious and joking is serious: marriage, divorce and taking back (one’s wife).” Narrated by Abu Daawood (2194), at-Tirmidhi (1184), and Ibn Maajah (2039). The scholars differed as to whether this report is saheeh or da‘eef; it was classed as hasan by al-Albaani in Irwaa’ al-Ghaleel (1826).
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: With regard to a divorce issued in jest, it counts as such according to the majority of scholars. Similarly, a nikaah (marriage contract) done in jest is also valid, on the basis of a marfoo‘ hadith. This is what is narrated from the Sahaabah and Taabi‘een, and it is the view of the majority.
End quote from al-Fataawa al-Fiqhiyyah al-Kubra (6/63)
If your husband addressed the words of talaaq to you in jest, and said to you “I give talaaq talaaq talaaq”, this is regarded as a talaaq issued in jest, and it counts as one talaaq.
If he did not mean to say that to you, and he was only narrating the words by means of which divorce (talaaq) takes place, or he wanted to mention them but he did not mean to direct them at you, whether in earnest or as a joke, then this is narrating the words of divorce, and it does not mean anything.
The same applies if a teacher or student says that one of the forms of divorce is for a person to say “Anti taaliq taaliq taaliq (you are divorced, divorced, divorced)”, not meaning to say that to his wife, but to narrate something that he has learned, or to call to mind something that he has learned.
Or if the husband goes to a shaykh and says: “I said to my wife, Anti taaliq (you are divorced).” This relating of an event does not count as a new divorce (talaaq).
Shaykh Zakariyya al-Ansaari (may Allah have mercy on him) said: The third condition (of talaaq) is the intention of divorce; it is stipulated that the words uttered be meant as such, i.e., to end the marriage, because what matters is intending to say the word and meaning it.
The idea of meaning it is important, so as to exclude relating the story of someone else’s divorce, explanations given by a faqeeh, and calling someone whose name happens to be Taaliq.
End quote from Asnaa al-Mataalib (3/280).
What is meant by calling someone whose name happens to be Taaliq is: calling a woman whose name is Taaliq by saying “O Taaliq!” and the like.
If the divorce does count as such, based on the details explained above, then it only counts as one talaaq.
That is because the view that is most likely to be correct is that the threefold talaaq – whether it involved saying the word once, as in the phrase “Anti taaliq thalaathan (You are divorced thrice)” or it involved saying it more than once, as in the phrase “Anti taaliq taaliq taaliq (you are divorced, divorced, divorced)” – only counts as one. The same applies if it happened on different occasions, but there was no taking her back or new marriage contract in between. It only counts as one talaaq, and a second or third talaaq cannot count unless it comes after taking the wife back or doing a new marriage contract.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The view that is most likely to be correct concerning all these issues is that there is no such things as a threefold divorce, unless there is the taking back of the wife or a new marriage contract in between. Otherwise, the threefold divorce does not count as three. This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him), and it is the correct view. End quote from ash-Sharh al-Mumti‘ (13/94).
What Muslims, both men and women, must do is learn the rulings of their religion that they need to know, such as learning the rulings on marriage for anyone who wants to get married; that also includes what counts as divorce (talaaq) which brings the marriage contract to an end.
And Allah knows best.