Fixed the count() function.