According to the Islamic Laws of Ayatollah Syed Sistani:
514. From the time when the child birth takes place, the blood seen by the mother is Nifas, provided that it stops before or on completion of the tenth day.
516. It is not necessary that the baby is fully grown. Even if a deficient baby is born, the blood seen by the mother for ten days will be Nifas. The term 'Child birth' must be applicable to it.
517. It is possible that Nifas blood may be discharged for an instant only, but it never exceeds 10 days.
519. On the basis of precaution, halting or pausing in a masjid and other acts which are haraam for a Haaez are also haraam for a Nafsa and those acts which are obligatory for a Haaez are also obligatory for a Nafsa.
521. When a woman becomes Pak from Nifas, she should do Ghusl and perform acts of worship. And if she sees blood again, once or often, and the total number of days on which blood is seen and the intervening days during which she remains Pak is 10 or less than 10, then all of it will be Nifas. In the intervening days, as a precaution, she will perform all that is obligatory for a Pak woman and also refrain from all acts which are forbidden to a woman in Nifas. So, if she had kept fasts, she will give their Qadha. And if the blood which she saw later exceeds ten days then there can be two situations: if the woman does not have a fixed habit of duration, then she will count the first ten days as Nifas, and the rest as Istihaza. and if she has fixed habit of duration, then, as a precaution, the blood which she sees after the habitual days of duration will require her to act as a Mustahaza, and also avoid all that is forbidden to a woman in Nifas.
A few more related rulings can be found here: http://www.sistani.org/ english/book/48/2178/