How to count the number of rows coming out of a too many relationships where there are two conditions in Laravel
<p>I am looking to count the number of rows coming out of a too many relationships where there are two conditions. The query is below:</p>

<pre><code>$follow = count($profiles-&gt;follow-&gt;where('follow_id', $account)-&gt;where('user_id', $user));
</code></pre>

<p>I currently have entries in follow_id as 17 and in the user_id as 16.</p>

<p>A dump of <code>$account</code> and <code>$user</code> shows the data is correct.</p>

<p>The result is currently coming back as 0 where I am looking for it to be 1.</p>

<p>Thanks</p>