get_repository( self::class ) ->where( 'source', $source ) ->where( 'to', $email ) ->where( 'timestamp', '>=', $date_from ) ->where( 'timestamp', '<=', $date_to ) ->count(); } }