[#bsl-unordered_multiset-06c-count-007]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_multiset-06c.adoc[unordered&lowbar;multiset]::count
:relfileprefix: ../../
:mrdocs:

Return the number of elements equivalent to `key`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:bsl/unordered_multiset-06c/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

Return the number of `value&lowbar;type` objects within this unordered multiset that are equivalent to the specified `key`&period; The behavior is undefined unless `key` is equivalent to the elements of at most one equivalent&hyphen;key group in this unordered multiset&period;

== Return Value

number of elements equivalent to `key`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key value to count
|===


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