[#bsl-unordered_set-09-count-0d]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_set-09.adoc[unordered&lowbar;set&lt;Attribute, AttributeHash&gt;]::count
:relfileprefix: ../../
:mrdocs:

`count` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;unorderedset&period;h&gt;`

Return the number of `value&lowbar;type` objects within this unordered set that are equivalent to the specified `key`&period; Note that since an unordered set maintains unique keys, the returned value will be either 0 or 1&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_set-09/size_type.adoc[size&lowbar;type]
xref:bsl/unordered_set-09/count-06.adoc[count](xref:bsl/unordered_set-09/key_type.adoc[key&lowbar;type] const& key) const;
----

[.small]#xref:bsl/unordered_set-09/count-06.adoc[_» more&period;&period;&period;_]#

Return the number of `value&lowbar;type` objects within this unordered set that are equivalent to the specified `key`&period; The behavior is undefined unless `key` is equivalent to at most one element in this unordered set&period; Note that since an unordered set maintains unique keys, the returned value will be either 0 or 1&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:bsl/unordered_set-09/size_type.adoc[size&lowbar;type]
xref:bsl/unordered_set-09/count-01.adoc[count](LOOKUP&lowbar;KEY const& key) const
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;HASH, LOOKUP&lowbar;KEY&gt;&colon;&colon;value
        &amp;&amp; BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;EQUAL,LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

[.small]#xref:bsl/unordered_set-09/count-01.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
