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?