Please use below LINQ to group your DataTable by Branch and Item and count the occurrences of each Item
var grouped = dt.AsEnumerable()
.GroupBy(row => new {
Branch = row.Field(“Branch”),
Item = row.Field(“Item”)
})
.Select(g => new {
Branch = g.Key.Branch,
Item = g.Key.Item,
Count = g.Count()
});