I have an array of object like this:

```
[
  {
    rating: 1
  },
  {
    rating: 2
  },
  {
    rating: 3
  },
  {
    rating: 1
  }
]

```

I want the result like this - 

```
{
  1: 2,
  2: 1,
  3: 1
}

```

It will be `Rating_Value: Count`.

How can I do that in lodash? Or if it can be optimized without lodash?