function getBlocksCount(
        $fromDate = null,
        $toDate = null,
        $contactIds = null,
        $contactEmails = null,
        $contactExternalIds = null,
        $reasons = null,
        $oldStatus = null,
        $newStatus = null,
        $excludeAnonymousBlocks = false)
    {

        $params = $this->createCountQueryParameters($fromDate, $toDate, $contactIds, $contactEmails, $contactExternalIds, null, null);

        if (isset($excludeAnonymousBlocks)) $params['exclude_anonymous_blocks'] = ($excludeAnonymousBlocks == true) ? "true" : "false";

        $params = $this->appendArrayFields($params, "reasons", $reasons);
        if (isset($oldStatus)) $params['old_status'] = $oldStatus;
        if (isset($newStatus)) $params['new_status'] = $newStatus;

        return $this->get('reports/blocks/count', $params);
    }