Portal's ghost counts. It's so weird

I’m confused if this is a BUG or a feature?, The portal doesn’t exist, but it does leave a count

1. When you expand all the rem and move to other page with mouse or cut rem to the page, it doesn’t leave the portal count.

2. But if you collapse all the rem and move to other page with the mouse or cut rem to the page, the ““sub-level”” rem will leave the portal count

3. The most weird thing is the move function. You will see that the portal count is left in the parent rem, and when I delete the portal on the page1, the portal count is saved in the child rem

A bug, thanks for providing such clear steps to reproduce.