I have an array that when printed using print_r($user_ids); outputs as:
Array ( [0] => stdClass Object ( [user_id] => 2 ) )
I have tried writing the following where I am trying to count how many user_ids there are, so this should print 1 but it is printing as if the array is emptry
print_r(array_count_values($user_ids));
count($array)