[#bsl-set-0d-count-0a3]
= xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::count
:relfileprefix: ../../
:mrdocs:

`count` overloads

== Synopses

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

Return the number of elements equivalent to `key` (0 or 1)&period;


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

[.small]#xref:bsl/set-0d/count-0ac.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:bsl/set-0d/size_type.adoc[size&lowbar;type]
xref:bsl/set-0d/count-03.adoc[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]#xref:bsl/set-0d/count-03.adoc[_» more&period;&period;&period;_]#

== Return Value

* 0 or 1, since keys are unique
* number of elements equivalent to `key`

== Parameters

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


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