std::set::count

std::set::count

size_type count( const Key& key ) const;
(1)
template< class K > 
size_type count( const K& x ) const;
(2) (since C++14)

Returns the number of elements with key that compares equivalent to the specified argument, which is either 1 or 0 since this container does not allow duplicates.

1) Returns the number of elements with key key.
2) Returns the number of elements with key that compares equivalent to the value x. This overload only participates in overload