Another restriction is that currently you cannot modify a table and select from the same table in a subquery. This applies to statements such as DELETE, INSERT, REPLACE, UPDATE, and (because subqueries can be used in the SET clause) LOAD DATA INFILE.
now i see why that makes sense, simply because the value you are SELECTing might change during or after the global UPDATE query. however, the update to take place depended on an aggregate (COUNT()) function from that same table. i've gotten around this for now by running them in separate queries, but i like to try to condense my queries where possible. anyone know of a way around this? my guess is no, but i'm not a MySQL guru.