In my opinion you should create 2 tables with at least such fields:
orders
id | user_id | date
ordered_items - you must have full table of items as well, besides this table, containing all the info about your products. Price
here is needed just because prices of your items can change and you must not change 'amount of money spent' on already created orders.
item_id | order_id | quantity | price
So you could then use joins and count everything you need - table joins will do all the work.