Use counters to signal whether setup/cleanup was run.