Count from the date that decides the contract. If it renews by itself, that is the notice deadline - the last day the contract lets either side give notice - which can be months before the end date. If it simply ends, it is the end date. Every timing below is counted from that date.
Not sure when your notice deadline is? Work it out with the calculator