I think this is what you are after
What I did following suggestions elsewhere in this form (and because I can wrap my head around how it is/was done) is used a global field to calculate the found count in the portal (child table). Then I created a one row portal based on the same filter as the portal in the tab with the global found count field. Not sure how many 'found' records you are expecting so field size may be an issue in order to display properly
[Looking at it now I think I need to nudge it down a bit - not lining up quite nicely enough!]
I can think of a couple of options:
1. Use the ExecuteSQL () function with the COUNT function. E.g.
ExecuteSQL ( "
SELECT COUNT (ID)
WHERE status = ? "
; "…" ; "" ; $status
2. Change the filtered portal to filter via the relationship. While this adds more table occurrences it also enables you to use a Count () function in a field calculation. E.g.
CUSTOMER::countPaid = Count ( CUSTOMER_invoice::ID )