First you need to choose your preferred licensing system. A small list is available in the Question about OS Licensing Components. Second you'll need some kind of service where your reseller can issue licenses without real access to your private license key. E.g. some kind of webservice.
Then you'll have the number of licenses that your reseller has created and you can bill him. If you also want to know which licenses was activated you can implement some kind of "phone home" in your application.