use a repeater / table to display DB column plus Count Column

Hi,
I’ve this problem: there’s a table with a list of statuses, some datasets (as much as the statuses are) to filter the view of each status in a specific repeater. I want to display a table with the list of the statuses and the “count” of how many record are in that status.

I know how to count each dataset elements

let count_DS2 = $w("#dataset2").getTotalCount();

but I don’t know how to embed this in a view with the data coming from a dataset.

I try to explain myself better. I want a result like this:
________-//-
| status 1 | status 2 | -//- | status N |
|----------±---------±//-±----------|
| 1 | 0 | -//- | 5 |
________-//-

thanks in advance