Redo getcount so that rather than risking accessing uninitialized memory, we just handle the logic inside
Fix formatting
Constify in_list arguments
Update detonate to use new-style calling