pgrep -c prints how many running processes match the name nginx instead of their PIDs. A count of zero also means pgrep exits nonzero, which is handy in script conditions. Combine with -f to match against the full command line.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.