How to count emails through API?

How to count emails through API?

We need to count the emails that a lead or contact sent and got and write the result to a custom field in another module. For this we want to use the API. On https://www.zoho.com/crm/help/api/modules-fields.html I could not find the respective fields. So how can we do this?