Cosmethic change: sort imports and strip trailing whitespace
pacman: use subprocess.check_call
pacman: use list comprehension
Rename query_package to is_installed, drop unneeded checks and arguments
pacman: Improve error reporting
Cosmethic: follow Uncle Bob's advice to make code readable from top to bottom
Rename install_c and remove_c to installed_count and removed_count, respectively