When do you count the last day of your period?

Would you say your period is over when the blood is no longer red and is just coming out brown? Or when there’s nothing at all and no need to wear a tampon or pad?