[#BloombergLP-bdlc-FlatHashSet-count-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet]::count
:relfileprefix: ../../../
:mrdocs:

`count` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;flathashset&period;h&gt;`

Return the number of elements in this set having the specified `key`&period; Note that since a flat hash set maintains unique keys, the returned value will be either 0 or 1&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::size&lowbar;t
xref:BloombergLP/bdlc/FlatHashSet/count-06.adoc[count](KEY const& key) const;
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/count-06.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
std::size&lowbar;t
xref:BloombergLP/bdlc/FlatHashSet/count-04.adoc[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;
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/count-04.adoc[_» more&period;&period;&period;_]#


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