<?php
$arr = [
    ['id' => 1, 'name' =>'111'],
    ['id' => 2, 'name' =>'222'],
    ['id' => 3, 'name' =>'333'],
    ['id' => 4, 'name' =>'333'],
    ['id' => 5, 'name' =>''],
];

Data::ini($arr)
    ->array_column('name', 'id')
    ->array_filter()
    ->array_unique()
    ->count()
    ->strval()
    ->echo(); // 3

Data::ini($arr)
    ->array_column('name', 'id')
    ->array_filter()
    ->array_unique()
    ->json_encode()
    ->exit(); // {"1":"111","2":"222","3":"333"}
?>