Count how many times a line appears based on part of text in a file with bash
<p>Lets say I have  a file:</p>

<pre><code>Player spawned prop
'player' has left the server
'newplayer' has connected
'someone else' has connected
</code></pre>

<p>I want to count how many times the string 'has connected' appears, to get a final number of 2.</p>