I'm new in Period HELP!!

So when does the period ends? When I stop bleeding like a lot or when the brownish blood is gone? I really need help, I don't know how to count the period