Praise be to Allah.
The scholars differed as to the maximum length of nifaas (post-partum bleeding). Some of them said that the maximum length of nifaas is forty days, because of the hadeeth of Umm Salamah (may Allaah be pleased with her): “At the time of the Messenger of Allaah (peace and blessings of Allaah be upon him), women in nifaas used to stay (not praying etc) for forty days” – narrated by Abu Dawood, 139; al-Albaani said it is hasan saheeh. This is the view of the majority.
So she should pray after that even if she continues to bleed, and she should make up the prayers that she missed, so long as the bleeding that comes after forty days does not coincide with the time of her monthly period. See question no. 10488.
Some of the scholars, such as Shaykh al-Islam Ibn Taymiyah, said that the basis principle regarding blood that comes out because of childbirth is that it is nifaas, so she should not pray until the bleeding stops, and he said there is no maximum limit for nifaas.
Some of then said that the maximum length of nifaas is sixty days. This is the view of al-Shaafaa’i (may Allaah have mercy on him).
In order to be on the safe side, you should make up the prayers that you missed after forty days, apart from the time that coincided with your monthly period. And Allaah knows best.
With regard to how the prayers should be made up: you have to do that as soon as this ruling reaches you. If it is difficult because of the large number of prayers involved, you can make them up as you are able to, even if that takes several days. And Allaah knows best.