Extend the v4portal API to include portal_count_emails() API.