Fixed slick count function.