Refactoring BHK count thingy