Counting specific lines in a log file <p>I have a log file containing more than 100000 lines similar to the following </p> <pre><code>2016-11-08 17:04:01|x.x.x.x|xxxxxxxxxxxxx|x.x.x.x|1002|xxxx|xxxxxx|1|2|https://xxxxxxxxx/xxxxxxx/xxxxxxx/xxxxxx{"status":500,"body":""} 2016-11-08 17:04:02|x.x.x.x|xxxxxxxxxxxxx|x.x.x.x|1003|xxxx|xxxxxx|1|2|https://xxxxxxxxx/xxxxxxx/xxxxxxx/xxxxxx{"status":400,"body":""} </code></pre> <p>Please help me to write a script that will return a count of lines only with <code>"status":500</code>.</p>