Golfing postgres how can I return count number from the query
<p>I am very new to Golang and am using the PQ package for postgres. What I am trying to do is prevent duplicate emails, so I have a query that checks to see if a user email is already in the database </p>

<pre><code>check_duplicate_emails, err := db.Prepare("select count(*) from profiles where email=$1")
    rows, err := check_duplicate_emails.Exec(email)

        if rows != nil {
        fmt.Fprintf(w,"Duplicate Email")
    } 
</code></pre>

<p>That is my code above how can I make it such that I can check like this</p>

<pre><code>if rows &gt;0 { ...}
</code></pre>

<p>when I try to do that I get the error</p>

<blockquote>
  <p>invalid operation: rows > 0 (mismatched types sql.Result and int)</p>
</blockquote>

<p>How can I solve this issue as I been looking around to resolve it for a bit now.</p>