Question: how to check if the rpm package is installed?
Answer: If you are on a RPM-based Linux platform (such as Redhat, CentOS, Fedora, ArchLinux, Scientific Linux, etc.), here are two ways to determine the list of packages installed. Using yum:
yum list installed. Using rpm:
rpm -qa. ... 
yum list installed | wc -l.
rpm -qa | wc -l.