public static int GetBugsCountByProject(string projectName)
{
DataClassesBugTrackingSystemDataContext db = new DataClassesBugTrackingSystemDataContext();
string sqlFindBugsCountByProjectName =
"SELECT Count(*) FROM Bugs b JOIN Projects p ON (b.ProjectId=p.ProjectId) WHERE p.Name = '" + projectName + "' and b.Status != 'Closed'";
int bugsCount = db.ExecuteQuery<int>(sqlFindBugsCountByProjectName).First();
return bugsCount;
}