def _check_pacman_updates(self):
        pending_updates = str(subprocess.check_output(["checkupdates"]))
        return pending_updates.count(self._line_separator)
This method will use the 'checkupdates' command line utility
dataset/ETHPy150Open ultrabug/py3status/py3status/modules/arch_updates.py/Py3status._check_pacman_updates