God. It worked like a charm and believe me I had never thought such a long
select clause.
Thank you very very much.
Btw, yes, you got me true

I was trying to get these numbers in order to let the user change the order of the products within the number(s) of its category. Otherwise, my foreach was showing 300something as the total number for each product. And it was meaningless.
--
Btw, I don't understand why I cant rate you