Skip to content

cnt [terminology]

Terminology

Usage

  • Use for a scalar count of occurrences, items, states, or valid constructions.
  • Prefer it over total when the quantity answers “how many?”
  • Use compound forms such as cnt1, cnt2, or cnt_max when several counts coexist.
  • Do not use singular cnt for a mapping.
cnt = 0

while n:
    n &= n - 1
    cnt += 1