The better way to do this is using database like
select Name,Country,count(*) No_of_times from table group by Name,Country
In C#, You need to do it using 2 Loops.
One for main table and another for distinct columns only.
DataTable dt = new DataTable();
DataTable dt_old = new DataTable();
dt = dt_old.DefaultView.ToTable(true, "Name", "Country");
dt.Columns.Add("Count", typeof(int));
foreach (DataRow r in dt.Rows)
{
DataTable dt_temp = new DataTable();
dt_old.DefaultView.RowFilter = "Name='" + r["Name"] + "' AND Country='" + r["Country"] + "'";
dt_temp = dt.DefaultView.ToTable();
r["Count"] = dt_temp.Rows.Count;
}
Hope this will help you.