[#bsl-map-0c7-count-08]
= xref:bsl.adoc[bsl]::xref:bsl/map-0c7.adoc[map&lt;int, pair&lt;shared&lowbar;ptr&lt;Statistics&gt;, shared&lowbar;ptr&lt;Collector&lt;OsLinux&gt;&gt;&gt;&gt;]::count
:relfileprefix: ../../
:mrdocs:

Return the number of `value&lowbar;type` objects within this map whose keys are equivalent to the specified `key`&period; Note that although a map 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&lowbar;KEY` as the comparisons used to order the keys in the map&period;

== Synopsis

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

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


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