title: C# Count number of rows in sql result
body: <pre><code>Connection c = new Connection();
  public string checkIfExists(string Name)
      {
          string sql = "SELECT * FROM users WHERE name = '" + name + "'";
          c.Execute(sql);
  
          return "";
      }
  </code></pre>
  
  <p>The c.Execute(sql) is calling a SqlCommand function to execute the sql query.</p>
  
  <p>I want to know how to count the number of rows retrieved by this query.</p>
  
  <p>Ignore the return.</p>