function unique_num = unique_count ( xyz )

%*****************************************************************************80
%
%% unique_count() counts unique values in a triplet of real numbers.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 March 2023
%
%  Author:
%
%    John Burkardt
%

%
%  A is unique.
%
  unique_num = 1;
%
%  If B is unique...
%
  if ( ~ nearly_equal ( xyz(1), xyz(2) ) )
 
    if ( ~ nearly_equal ( xyz(1), xyz(3) ) && ...
         ~ nearly_equal ( xyz(2), xyz(3) ) )
      unique_num = 3;
    else
      unique_num = 2;
    end
%
%  If B is not unique, is C unique?
%
  else
    if ( ~ nearly_equal ( xyz(1), xyz(3) ) )
      unique_num = 2;
    end
  end

  return
end

