code climate badge added
refactoring count method