How to count a group of data

Hello everyone,

Let's say I have the following set of data in my database table:

Cars table