initial scaffold
refactored test
refactored count code
refactored index and passing tests