correctly count number of products to add preference