Update the key or, if no previous value existed, add it.

        Returns:
            int: Number of updated lines.

def add_or_update(self, section, key, value):
        """Update the key or, if no previous value existed, add it.

        Returns:
            int: Number of updated lines.
        """
        updates = self.update(section, key, value)
        if updates == 0:
            self.add(section, key, value)
        return updates