Model/ResourceModel/Contact/Collection.php
public function getNumberSubscribers($websiteId = 0)
    {
        return $this->addFieldToFilter(
            'subscriber_status',
            \Dotdigitalgroup\Email\Model\Newsletter\Subscriber::STATUS_SUBSCRIBED
        )
            ->addFieldToFilter('website_id', $websiteId)
            ->getSize();
    }
public function getNumberSubscribers($websiteId = 0)
    {
        return $this->addFieldToFilter(
            'subscriber_status',
            \Dotdigitalgroup\Email\Model\Newsletter\Subscriber::STATUS_SUBSCRIBED
        )
            ->addFieldToFilter('website_id', $websiteId)
            ->getSize();
    }
public function getNumberSubscribers ( $ websiteId = 0 ) { return $ this -> addFieldToFilter ( 'subscriber_status' , \ Dotdigitalgroup \ Email \ Model \ Newsletter \ Subscriber :: STATUS_SUBSCRIBED ) -> addFieldToFilter ( 'website_id' , $ websiteId ) -> getSize ( ) ; }
Get number of subscribers.

@param int $websiteId

@return int
Get number of subscribers .