If the object you are querying implements IQueryable<T>
it will build a different query depending on the Extension methods you use. (Which it must be if you are using Linq-to-Entities)
However logging the SQL is not as simple as with Linq-to-SQL.
Either use a profiler, or try adding this Extension method to a static class in your project:
static string ToTraceString<T>(this IQueryable<T> t)
{
ObjectQuery<T> oqt = t as ObjectQuery<T>;
if (oqt != null)
return oqt.ToTraceString();
return "";
}
With it you should be able to verify the SQL that is created by the different queries.
var query = ...your normal query here...
Console.WriteLine(query.ToTraceString());
var countQuery = query.Count();
Console.WriteLine(countQuery.ToTraceString());
// Should return something along the lines of SELECT COUNT(...) FROM ...
var pagedQuery = query.Skip(PageIndex*PageSize).Take(PageSize);
Console.WriteLine(pagedQuery.ToTraceString());
// Should return something along the lines of SELECT ... FROM ... SKIP x LIMIT y