Fixing count element, although I'm not convinced it's actually going to
work in 3.x.