Select count(idx) from cs_goods where display=1 and part_idx=5 AND ranking <= AND idx<>'17424' AND code < ORDER BY ranking ASC,code DESC