Documentation step 1: Properly document counting functions.