Collection Methods
collections.Counter.total()
Sum all counts, including negative and zero counts.
Formal Syntax & Structure
python syntaxpython
counter.total()Return Value
number
The number result described above.
Working Example
Example Snippetpython
import collectionsprint(collections.Counter(a=5,b=-2).total())