In a table, I think you could use this as a calculated dimension (or as an expression in a list box, or whatever):
For script, you could do this:
,count(AccountNumber) as NumberOfAccounts
GROUP BY AccountHolderID
Generally speaking, I try to avoid doing accumulations in script. They aren't responsive to selections, and they complicate the data model. But in this case, I'm not sure you even WANT it to be responsive to selections, and it might be worth it for the extra performance gained by avoiding a calculated dimension.