How to see number of data entered by the same user

Hey all, I have e-commerce website. I am able to add product in my shoplist and I can see there. I have icon in my header. I want to see the number of products that I added in the shoplist above the icon. How can I achieve that? Thanks

If your shopping cart is stored in database than it’s “count” SQL query.

I do not store it in database. However I can see how many items that I choose in my cart.php file.

Then do count($items).