How to calculate count of string in array-- TypeScript angular 4 : [
    {
        "assetNo":"51GQA21AP001"
    },
    {
        "assetNo":"51GQA22AP001"
    },
     {
        "assetNo":"51GQA24AP001"
    },
     {
        "assetNo":"51GQA22AP001"
    },
     {
        "assetNo":"51GQA21AP001"
    },
     {
        "assetNo":"51GQA23AP001"
    },
     {
        "assetNo":"51GQA24AP001"
    }
]



I need the output following format:
 {
          "assetNo": "51GQA21AP001",
          "count": 2
        }, {
          "assetNo": "51GQA22AP001",
          "count": 2
        }, , {
          "assetNo": "51GQA23AP001",
          "count": 2
        },{
          "assetNo": "51GQA24AP001",
          "count": 1
        }