Using the apicontroller to return odata.$count

I have controllers that inherit from ApiController. I have the EnableQuery attribute at the top of it to allow ODATA query strings. However $count does not work.

For eg:- ../products?$count=true does return data with no odataexception, but does not return the count. Any suggestions