[#bsl-set-0d-count-0a3] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::count :relfileprefix: ../../ :mrdocs: `count` overloads == Synopses Declared in `<bslstl_set.h>` Return the number of `value_type` objects within this set that are equivalent to the specified `key`. Note that since a set maintains unique keys, the returned value will be either 0 or 1. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/size_type.adoc[size_type] xref:bsl/set-0d/count-0ac.adoc[count](xref:bsl/set-0d/key_type.adoc[key_type] const& key) const; ---- [.small]#xref:bsl/set-0d/count-0ac.adoc[_» more..._]# Return the number of `value_type` objects within this set that are equivalent to the specified `key`. Note that although a set maintains unique keys, the returned value can be other than 0 or 1, because a transparent comparator may have been supplied that provides a different (but compatible) partitioning of keys for `LOOKUP_KEY` as the comparisons used to order the keys in the set. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/set-0d/size_type.adoc[size_type] xref:bsl/set-0d/count-03.adoc[count](LOOKUP_KEY const& key) const requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value; ---- [.small]#xref:bsl/set-0d/count-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#