You need to read the document which sold the property (ie either a lease or transfer) which will state the period in which all or part of the discount (some are pro-rata'd, some aren't) given by the council is refundable to them.
The most common was 3 years but I've seen ones for 5 and even provisions for a percentage of the increase in value to be paid back to the council for a longer period.
You also need to check whether the council have any say in who you can sell it to.
Did you use a solicitor for the purchase, they should have advised you of this - did they send you any paperwork and a copy of the transfer/lease?