you can use the following command to list the process
ps aux | grep -c myProcessName
if you need to check the count of that process then run
ps aux | grep -c myProcessName |grep -v grep
after which you can kill the process using
kill -9 $(ps aux | grep -e myProcessName | awk '{ print $2 }')