$("input:checkbox:checked").length not working in IE? Works fine in Firefox.

$("input:checkbox:checked").length not working in IE? Works fine in Firefox.

Hello,
 
I have spent an hour or more on the issue of $("input:checkbox:checked").length  on ie8 and cannot think of any idea to overcome this problem. It always gives 0 value on IE8 while Firefox works fine. Is this a bug? I am using jquery-1.4.2.min.js. Please help.