Query syntax:
var count = (from t in context.MyTable
where t.Id == @Id
select t).Count();
Method syntax:
var count = context.MyTable
.Where(t => t.Id == @Id)
.Count()
Both generate the same SQL query.