PV of Bonds - BEC Question

In calculating the PV of a bond at a certain point in time, do you discount it by the number of periods left to maturity, or the total number of periods of the bond? Say there are a total of 5 periods, but 3 periods have passed. Would it be discounted by the factor of the 5 or the 2?