I have custom object on which history traking in enabled on number of fields. How can at run time i can get number of fields in objects on which history tracking in enabled from apex soql
I can't find this in Apex, but I can find it in the Tooling API and in the Metadata API.
For the Tooling API, check the CustomField object: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_customfield.htm
For the Metadata API, there is, for each field on an object, a "trackHistory" attribute. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm
(I'd go with the Metadata API and would use the wrapper. It's an easy deploy from the GitHub repository.