/// <summary>
 /// Returns the number of all elements.
 /// </summary>
 /// <typeparam name="T">The entity type.</typeparam>
 /// <param name="queryable">The queryable.</param>
 /// <returns></returns>
 public static int Count <T>(this ISpecificationQueryable <T> queryable)
 {
     return(queryable.Count(Identity <T>()));
 }
 /// <summary>
 /// Returns the number of elements satisfying a given predicate.
 /// </summary>
 /// <typeparam name="T">The entity type.</typeparam>
 /// <param name="queryable">The queryable.</param>
 /// <param name="predicate">The predicate to filter the elements.</param>
 /// <returns></returns>
 public static int Count <T>(this ISpecificationQueryable <T> queryable,
                             Expression <Func <T, bool> > predicate)
 {
     return(queryable.Count(Relay <T, T>(q => q.Where(predicate))));
 }