refactored some of the inventor count logic for speed