mysql error with named_scope and any?

Hi - need some help to pin this one.

Am upgrading a project to 2.3.2. Have changed has_finder to
named_scope. But I am getting an invalid mysql syntax error with a
finder that used to work

I have:

has_many :orders
has_many :line_items, :through=>:orders

has_many :line_items

named_scope :unmatched, :conditions => {'product_id'=>0}

gives me: Mysql::Error: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near '*) AS count_line_items_all FROM `line_items` INNER
JOIN `orders` ON `line_items`' at line 1: SELECT count(`line_items`.*)
AS count_line_items_all FROM `line_items` INNER JOIN `orders` ON
`line_items`.order_id = `orders`.id WHERE (((`line_items`.`product_id`
= 0) AND ((`orders`.batch_id = 1479))) AND ((`orders`.batch_id =

If I run the query, I can make it work with count(*) or count
( - is this a mysql problem?
Also note the batch id condition is included twice.

If I do
I get a valid query:
SELECT count(*) AS count_all FROM `line_items` INNER JOIN `orders` ON
`line_items`.order_id = `orders`.id WHERE ((`orders`.batch_id = 1479))

So am I doing something bad with my named_scope??

Thanks for any help