Count matches grep

Print only the number of matching lines

grep -c 'POST /api' /var/log/nginx/access.log