cppreference.com
>
C++ Bitsets
>
count
count
Syntax:
size_type
count();
The function count() returns the number of bits that are set to 1 in the bitset.