test a non-thread-safe reference counter