Implemented count-alive, fleshed out implementation details