UI5 - Count distinct values in a sap.m.table

I have a UI5 Table created with SAP Web IDE.

I want the table to have 2 columns. The first one should show my distinct values extracted from an ODATA Service and the second one should display the count of my values.

For example:

Value / Count

100 / 1

200 / 3

010 / 25

So far I have created the table with my values from SAP. But they are not unique yet - the first column is showing every value.

Value 100




and so on.

How can i group all my values and display the respective count of values?

Here's my code:


                    <Table id="Table" items="{/ODATASet}">
                                <Title level="H2" text="Data"></Title>
                                <Button icon="sap-icon://refresh" tooltip="Reinitialize Model" press="onModelRefresh"/>
                                <Label text="Values"></Label>
                                <Label text="Count"></Label>
                                    <Text text="{INTST}"></Text>


        //Accessing the table from the fragment by it's Id  
        var oTable = this.byId("Table");

        //column list item creation
        var oTemplate = new sap.m.ColumnListItem({
            cells: [new sap.m.Text({
                text: "{INTST}"
        var sServiceUrl = "/sap/opu/odata/sap/ODATAService";
        //Adding service to the odata model
        var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, false);
        //Setting model to the table
        oTable.bindAggregation("items", {
            path: "/ODATASet",
            template: oTemplate