Helper/Data.php
public function getCustomersWithDuplicateEmails()
    {
        $customers = $this->customerFactory->create()
            ->getCollection();

        //duplicate emails
        $customers->getSelect()
            ->columns(['emails' => 'COUNT(e.entity_id)'])
            ->group('email')
            ->having('emails > ?', 1);
        return $customers;
    }
public function getCustomersWithDuplicateEmails()
    {
        $customers = $this->customerFactory->create()
            ->getCollection();

        //duplicate emails
        $customers->getSelect()
            ->columns(['emails' => 'COUNT(e.entity_id)'])
            ->group('email')
            ->having('emails > ?', 1);
        return $customers;
    }
public function getCustomersWithDuplicateEmails ( ) { $ customers = $ this -> customerFactory -> create ( ) -> getCollection ( ) ; //duplicate emails $ customers -> getSelect ( ) -> columns ( [ 'emails' => 'COUNT(e.entity_id)' ] ) -> group ( 'email' ) -> having ( 'emails > ?' , 1 ) ; return $ customers ; }
Number of customers with duplicate emails, emails as total number.

@return \Magento\Customer\Model\ResourceModel\Customer\Collection
Number of customers with duplicate emails emails as total number .