That should not count towards your quota. M2M calls are ones that originate with a client credentials grant, and have not user interaction. See this post for a thorough explanation and let me know if you have questions:
Send the API the access token, if it is valid and not expired, then return the resource.