How to count period day

how do you know when your periods finished. is it when the red blood stops or brown spots dissappear?