begin get count logic and tests