Too much optimization.

(SELECT COUNT(*) FROM OneTable => SELECT COUNT(*) FROM OneTable WHERE
ROWNUM <= 500)