Store counter in a shared_ptr.

You know, demonstrate its use a bit further.
Rename noise_count -> object_counter.