I am trying this example in this I have to add total product count number i.e. total table rows display on screen.
https://sapui5.netweaver.ondemand.com/sdk/explored.htm
I answer your question by modifying the code of your example.
<headerToolbar>
<Toolbar>
<Label text="Products"></Label>
<Label text=""
{
path: '/ProductCollection',
formatter: 'sap.m.sample.Table.Formatter.totalFormatter'
}"">
</Label>
</Toolbar>
</headerToolbar>
totalFormatter:function(results) {
return results.length;
}
Then you will get the total table row.
The basic idea is to utilize the Calculated Fields of Data binding to get the result length. The documentation can be found here.