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

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

== Synopsis

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

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

== Description

Note that since a set maintains unique keys, the returned value will be either 0 or 1&period;

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

== Return Value

0 or 1, since keys are unique

== Parameters

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


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