The criteria is this. One must be completely clean for 10 days however in these ten days, for example 8 days you were clean and for the 2 days you see very little discharge after which it starts again (making the total number of days after your previous bleeding 10/12 days) and you see that this blood is different from previous meaning it's a new cycle starting and this blood is not of the previous blood. This new blood can be hayz however if you say no, the blood flow is the same as that of the one before the 10 days ended and it is a continuation of the previous blood, then just as the previous one is istihadha, this will be istihadha as well