Your question is NOT clear. I'm guessing that you want to create new datatable. Then you want to add a number of rows depending on result of EF query.
using System.Data;
public static DataTale CountResult(int _id)
{
var t=MyStudentEntities.Where(x=>x.ID=_id).Count();
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("CountResult", typeof(int)));
for(int i=0; i<=t; i++)
dataTable.Row.Add(new object[]{i});
return dt;
}