refactored count methods