I've been looking for the right object to query using the API to get the used/total amount per license type, but I'm not quite sure which one holds this information.
PermissionSetLicense
seems to contain Used/Total values, but it is related to Permission Sets and returns 0 results when I query it.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_permissionset.htm
UserLicense
seems related to License too, but it doesn't contain field related to this.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_userlicense.htm
Am I missing something?