Fix Python 2.6 compatibility (count() does not take keyword arguments)