How to work with arrays sort, Iteration, methods

I have information about my products here and I want to find out how many copies of each product I have and that they show duplicate products and the number of duplicate products in the section.
(Item_number) are displayed.

const arrOfProducts = [
{
id: 1,
image: ‘/’,
nameProducts: ‘T’,
},
{
id: 2,
image: ‘/’,
nameProducts: ‘m’,
},
{
id: 1,
image: ‘/’,
nameProducts: ‘T’,
},
];

    <div className={styles.image_item_infiniti}>
      {arrOfProducts.map((item, index) => {
        return (
          <AboutShoppingComponent
            key={index}
            item_image={item.image}
            item_number={item.id}
            item_number_about_shopping_component={item.number}
          />
        );
      }, 0)}
    </div>