Niddah 30 - A Forgetful Woman
Imagine the following situation. A woman went away pregnant, but returned later without a child, and she does not recall when her pregnancy got terminated. Then she experienced three pure weeks, and afterward - ten alternating weeks, where she saw blood one week, and no blood the next week. She may cohabit with her husband on the thirty-fifth day of her arrival, and she must go to the mikveh ninety-five times in this thirteen week period - these are the words of Beit Shammai. Beit Shammai's rule is that it is a mitzvah to go to a mikveh exactly on the day when it is needed, and because of the interplay of multiple uncertainties, there ninety-five days when it might be needed. Beit Hillel don't agree to this rule, but they still find enough possible uncertainties to require her to go to the mikveh thirty-five times.
If a woman miscarried on a fortieth day after conception (which she knows because it is forty days after she went to the mikveh), she need not be concerned that it was a child, and therefore the laws of ritual impurity of childbirth do not apply to her. If, however, it is the forty-first day, she must observe all the limitations of the birth of a male, and all of the female, and a regular niddah law, as if there was no birth.
Art: Ubaldo Gandolfi - Portrait of a Young Woman Thought to be the Artist's Wife