Added count function

The count function has an if/else statement checking if each element of the array is a string. Is this something you want? If so, what would you like the function to return if it fails? 
Where would you put a call to `assert(actual, expected, message)` to assert that an `Error` is thrown?