She prays and fasts when there is brownish or yellowish discharge at the time of her period; what should she do?
Question

 
I know that the yellowish and brownish discharge is hayd (menses) if it appears during the time of the period, or if it is connected to the number of days of the period, in the sense that no tuhr (sign of purity) is seen during that time.
My question is: when I first reached puberty, I did not count the yellowish discharge as menses at all, out of ignorance, and I do not even remember whether I saw it or not, but I did not have anyone to teach me the rulings on menses. So I think that I may have counted the number of days wrong, because I did not count the yellowish discharge as menses at all.
Is it permissible for me to count the number of days? If the answer is yes, then how should I count the number of days of the period?
Please do not tell me that I should count the yellowish and brownish discharge as menses at the time when it is possible for that to be the case, because I think that this view opens the door to waswasah (whispers from the Shaytaan).
Praise be to Allah.The scholars (may Allah have mercy on them) differed concerning the yellowish and brownish discharge and whether it is to be counted as part of the period or not. The most correct scholarly view is that if it occurs during the days of the period, then it is part of the menses, but after the woman has become pure, it does not count as anything. 
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: No attention is to be paid to the yellowish and brownish discharge if it occurs after the woman becomes pure. This is the view of Ahmad and others, because of the words of Umm ‘Atiyyah: We used to not regard the yellowish or brownish discharge as being of any significance. 
End quote from al-Ikhtiyaaraat al-Fiqhiyyah (1/401). 
Secondly: 
If it is established that they are part of the menses during the usual time of the period, then if a woman counts the brownish and yellowish discharge as not being part of her menses in all cases, whether they occur during the days of her period or after it has ended, either because she is following a scholar who says that, as is the view of Ibn Hazm and those scholars who agreed with him, and it is one of the two views of Shaykh Ibn ‘uthaymeen, on the basis of which he used to issue fatwas in the later part of his life;
or because she was unaware of the ruling on that altogether – then there is no blame on her for that, especially in the light of what is mentioned in the question, that she cannot be certain whether she saw that at that time in the first place. 
Allah, may He be exalted, says (interpretation of the meaning): “On no soul does Allah Place a burden greater than it can bear. He gets reward for that (good) which he has earned, and he is punished for that (evil) which he has earned. ‘Our Lord! Punish us not if we forget or fall into error” [al-Baqarah 2:286] – Allah said: I will do that; “our Lord! Lay not on us a burden like that which You did lay on those before us (Jews and Christians)” [al-Baqarah 2:286]–  Allah said: I will do that; “Pardon us and grant us Forgiveness. Have mercy on us. You are our Maula (Patron, Supporter and Protector, etc.)” [al-Baqarah 2:286]– Allah said: I will do that. Narrated by Muslim. 
See also the answer to question no. 150069.
And Allah knows best.