Just to clarify a few points. We have never heard of or seen a means for the dealer to detect a previously installed AccessPORT. That doesn't mean that such capability will not be added in the future or that it exists now on newer cars and the capability of the dealer to access it will be added later. There are many ways for a manufacturer to implement a flash counter that would make it difficult to find (or not immediately obvious).
That said, the AccessPORT ver. 2 saves a copy of the existing ROM (i.e. ECU's image) before it flashes our custom ROM when you marry. When you uninstall the AccessPORT ver. 2, it puts the original back on. So, you are back where started and the AP does not leave any trace.
The problem is that if a flash counter did exist (as is the case with some other manufacturers), it would be counting each reflash, whether that was by the dealer or by aftermarket flashing means (ex. AccessPORT, Ecutek, or Open Source). So, if the number of flashes didn't match the dealer's records, they could make an assumption that you were running an aftermarket tune. Again, we have never heard nor seen any evidence that a dealer has this capability for Subarus, but that is likely how it would work if they did.