So usually you can just do
SELECT COUNT(field.id) FROM table WHERE field.id > 100
and COUNT(field) will return the number of entries that has the criterion of field.id > 100
But then what if you what to count entries specified with the HAVING criterion such as
SELECT COUNT(field.id), field.id * 10 AS foo FROM table HAVING foo > 100
the code wouldn't work in this case....
How do I go about counting entries whose criterion are specified via the HAVING clause?
Thanks in advance