title: record count of entity datasource
body: <p>How does one get the total count of records from entitydatasource in asp.net c#</p>
  
  <pre><code>&lt;asp:EntityDataSource ID="entproducts" runat="server" 
  ConnectionString="name=CommerceEntities" 
  DefaultContainerName="CommerceEntities" EnableFlattening="False" 
  EntitySetName="products" Where="it.Berths=@dpberths" 
  OrderBy="it.[id] DESC" EntityTypeFilter="" Select="" 
  ondatabinding="entproducts_DataBinding" onselecting="entproducts_Selecting"&gt;
   &lt;WhereParameters&gt;
       &lt;asp:ControlParameter ControlID="dpberhs" Name="dpberths" 
           PropertyName="SelectedValue" DbType=int32 /&gt;
   &lt;/WhereParameters&gt;
  
      &lt;/asp:EntityDataSource&gt;
  </code></pre>