Implement counting_allocator