I can explain why it fails, but keep hitting roadblocks when I try to craft a field that I can drop in your portal to compute the correct sub total. I can do it in a summary report with sub summary parts, basing it on the Log In table, but am still mulling over how to do this in a portal...
In the case of your log in counts, you are referring to Log In 2. The relationship from Users to Log In 2 only matches by UserID so the count you see is the count of all the times this user has a record of that ID in the log in table. The IP address in the current record of the layout does not affect that count.
The transactions count is much worse, to figure it out on paper, the relationship path starts with USers, goes to log in, then to IP Address then to Transactions. That may TO's results in all records matching by the time you get to the final TO and that's the count you see in the portal.