I will answer your question by changing the code of your example.
Change Table.view.xml, add one label in the Toolbar.
<headerToolbar>
<Toolbar>
<Label text="Products"></Label>
<Label text=""{
path: '/ProductCollection',
formatter: 'sap.m.sample.Table.Formatter.totalFormatter'
}"">
</Label>
</Toolbar>
</headerToolbar>
Edit formatter.js, add one totalFormatter method.
totalFormatter:function(results) {
return results.length;
}
Then you will get a general table of rows.
Calculated Fields of Data . .