Count based on call result

Count based on call result

Hi

I need to count the calls with a specific call result, namely the call result will be " Invalid number"

I have the following code to count total number of calls for a contact, and it works, i cant seem to figure out how to go the one extra step and count only the calls that have specific call result

 
RelatedCalls = zoho.crm.getRelatedRecords("Calls", "Contacts", contactId.toLong()); 
total = RelatedCalls.size(); 
info total;