It is, indeed, tricky to keep up with the count while counting sheep. We've not seen it posited elsewhere, but wouldn't the intricate finger positions of the Buddhist mudras have originated as a counting system for mantra repetitions? Illustration from the University of Cincinnati's 1950 yearbook.