che io sappia (ma posso sbagliarmi) un cookie con può contenere un array...
quindi questo è errato:...
count($_COOKIE['prodotti'])