Entering ur period days on the calendar tmi warning

I'm a bit confused with my cycle days and mabey I've been entering them wrong ? is the first day of ur period wen u start to bleed even tho its just spotting or is it wen it's more established? Also do u count the days as ur period when it's old brown blood at the end ? Thanks