title: Assign value that represents the number of records (count) from SQL query to variable in C#
body: <p>I would like to create a variable in C# that represents the number of records of a query.
  I tested the query and works correct , returning the correct value.</p>
  <pre><code>SELECT Count(c.Cell_ID) AS CountOfCell_ID
  FROM Cells AS c
  HAVING (((Exists (SELECT 1
                FROM ΠΑΡΟΝΤΕΣ as cu
                WHERE c.Cell_ID = cu.CellID))=False));
  </code></pre>
  <p>This returns a number only.
  I would like to assign that number(result) to a variable in c#.</p>
  <p>First step is to write the following C# code in visual studio</p>
  <pre><code>int: CountValue;
  cnn.ConnectionString = CnnStr;
           cnn.Open();
              OleDbCommand command = new OleDbCommand();
              command.Connection = cnn;
              string query = &quot;SELECT Count(c.Cell_ID) AS CountOfCell_ID FROM Cells AS c HAVING(((Exists(SELECT 1 FROM ΠΑΡΟΝΤΕΣ as cu WHERE c.Cell_ID = cu.CellID)) = False));&quot;;
  </code></pre>
  <p>what should i do next to assign the value contained in query to CountValue?</p>