Refactored gem count functionality to not use gem.xml