Expose observerCount for testing