How to Expiate for Swearing by Allah and Lying
Question

Unfortunately since I was small I have had the habit of swearing by Allah whether I am telling the truth or not. I have tried to give up this bad habit and I believe that I am now following the right path. My question is: what is the ruling on the oaths I have sworn in the past? What should I do so that Allah will forgive me? Should I offer expiation for each oath? But the problem is that I cannot know how many oaths I swore. Please advise me, may Allah reward you with good.
Praise be to Allah.Oaths are of three types: 

A binding oath . This is an oath which a person means and is sure about, referring to something in the future which he resolves to do or not do. The ruling on this is that expiation is obligatory if the oath is broken.

Ibn Qudamah (may Allah have mercy on him) said: 
“Whoever swears to do something and he does not do it, or he swears not to do something and he does it, must offer expiation.” There is no difference of opinion concerning this matter among the jurists. Ibn ‘Abd al-Barr said: The vow for which expiation is due, according to the consensus of the Muslims, is that concerning actions in the future.” (Al-Mughni, 9/390) 

Unintentional oaths. This refers to swearing when there was no intention of making an oath. No expiation is due on such oaths , because Allah says (interpretation of the meaning): 

“Allah will not call you to account for that which is unintentional in your oaths, but He will call you to account for that which your hearts have earned. And Allah is Oft-Forgiving, Most-Forbearing.” [Al-Baqarah 2:225]
`Aishah (may Allah be pleased with her) said: This verse, ‘Allah will not call you to account for that which is unintentional in your oaths’, was revealed concerning saying, “No, by Allah’ and “Yes, by Allah.” (Narrated by al-Bukhari, 4613) 
Whoever swears to something thinking that it is as he has sworn it to be, then finds out that it is otherwise, does not have to offer expiation according to the majority of scholars. This comes under the heading of unintentional oaths. 
Ibn Qudamah (may Allah have mercy on him) said: 
“Whoever swears to something thinking that it is as he has sworn it to be, when that is not the case, does not have to offer expiation, because this is a kind of unintentional oath. Most of the scholars are of the view that no expiation is required for this kind of oath. Ibn al-Mundhir said: This was narrated from Ibn 'Abbas, Abu Hurayrah, Abu Malik, Zurarah ibn Awfa, al-Hasan, al-Nakha’i, Malik, Abu Hanifah and al-Thawri. 
Those who said that this is an unintentional oath were: Mujahid, Sulayman ibn Yasar, al-Awza’i, al-Thawri and Abu Hanifah and his companions. 
Most of the scholars are of the view that no expiation is required for an unintentional oath. Ibn ‘Abd al-Barr said: the Muslims are unanimously agreed on that. 
That is because Allah says (interpretation of the meaning): “Allah will not call you to account for that which is unintentional in your oaths.” [Al-Baqarah 2:225] This comes under that heading, because he did not intend to give a wrong impression, so it is as if he broke the oath by mistake. (Al-Mughni, 9/393) 

Swearing falsely concerning something that is in the past. This is a major sin, and there is no expiation for it according to the majority of scholars because it is too serious to be expiated. 

If this is understood, then if the oaths that you swore were binding oaths that you broke, so you have to offer expiation. 
If you have forgotten how many oaths there were, then do your best to remember and offer expiation based on what you think is most likely to be the case, then you will have absolved yourself. 
Whatever of these oaths had to do with doing a certain action, or refraining from a certain action, only one expiation is required in each case. For example, if you swore that you would not speak to So and So, then you broke that oath and did not offer expiation, then you swore again not to speak to him, and you broke the oath again, you only have to offer expiation once. This is different from the case if you had sworn not to speak to him, then you swore not to eat his food, for example. In that case you would have to offer expiation twice. We have already discussed this in detail in the answer to question no. 34730 .  
To sum up, with regard to the oaths that you swore to do something or not to do something in the future, and you broke them, you have to offer expiation for them. 
With regard to oaths that you swore falsely saying that you did something in the past or did not do it, and you were lying, there is no expiation to be offered, but you have to repent to Allah, and Allah accepts the repentance of those who repent.  May Allah help you and forgive your sin.
And Allah knows best.