/// <summary>
 ///     Counts all elements from a table
 /// </summary>
 /// <typeparam name="TPoco">The type of the poco.</typeparam>
 /// <returns></returns>
 public ElementProducer <int> Table <TPoco>()
 {
     return(new SelectQuery <int>(Add(new CountTargetQueryPart(new QueryIdentifier()
     {
         Value = $"[{ContainerObject.AccessLayer.Config.GetOrCreateClassInfoCache(typeof(TPoco)).TableName}]",
         QueryIdType = QueryIdentifier.QueryIdTypes.Table
     }, ContainerObject.CreateAlias(QueryIdentifier.QueryIdTypes.SubQuery))
     {
         DistinctMode = DistinctMode
     })));
 }