I created a successful query that counts the number of objects + average the prices of the counted objects. the query looks like this:
select count (product_i