1. var data =
  2. from country in db.GetTable<Country>().Where(c=>c.Allowed)
  3. let totalTeams = country.Teams.Count()
  4. let teamsWithoutOwner = country.Teams.Count(t=>t.OwnerId != 0)
  5. select new CountryTeamsInfo
  6. {
  7.     CountryId = country.Id,
  8.     TeamsTotal = totalTeams,
  9.     TeamsWithoutOwnerFree = teamsWithoutOwnerFree
  10. };