def count(self, item):
        """Counts references to 'item' in a caseless manner.
        If item is not a string it will always return 0."""
        if not isinstance(item, str): return 0
        count = 0
        for entry in self:
            if item.lower() == entry.lower():
                count += 1
        return count
Counts references to 'item' in a caseless manner.
        If item is not a string it will always return 0.
recipes/Python/284569_caselessList/recipe-284569.py