count number of rows in a table in c#
conString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
using (var conn = new MySqlConnection(conString))
{
conn.Open();
using (var cmd = new MySqlCommand("SELECT COUNT(*) FROM DBName.Table.name", conn))
{
puzzCount = Convert.ToInt32(cmd.ExecuteScalar());
}
}