[#bsl-unordered_map-02b-count-0e]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered&lowbar;map]::count
:relfileprefix: ../../
:mrdocs:

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

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:bsl/unordered_map-02b/size_type.adoc[size&lowbar;type]
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;
----

== Description

Note&colon; implemented inline due to Sun CC compilation error&period;


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