Well I\'ve just hit a weird behaviour that I\'ve never seen before, or haven\'t noticed.
I\'m using this query:
SELECT *, COUNT(*) AS pag
This is inefficient, but will work:
SELECT *, (SELECT COUNT(*) FROM notis WHERE cid=20) AS pages FROM notis WHERE cid=20 ORDER BY nid DESC LIMIT 0,3