# C1.LiveLinq.Indexing.Search.IIndexScanner-1.KeyCount

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_Indexing_Search_IIndexScanner_1_KeyCount_" data-uid="C1.LiveLinq.Indexing.Search.IIndexScanner`1.KeyCount*">KeyCount Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_Indexing_Search_IIndexScanner_1_KeyCount_" data-uid="C1.LiveLinq.Indexing.Search.IIndexScanner`1.KeyCount*"></a>
<h4 id="C1_LiveLinq_Indexing_Search_IIndexScanner_1_KeyCount" data-uid="C1.LiveLinq.Indexing.Search.IIndexScanner`1.KeyCount">KeyCount</h4>
<div class="markdown level1 summary"><p>Gets the number of distinct key values in all items of this collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">int KeyCount { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">ReadOnly Property KeyCount As Integer</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>Number of distinct key values in the collection.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_Indexing_Search_IIndexScanner_1_KeyCount_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This number is not the same as the number of elements in the collection, unless the index key
is a unique key of that collection, see <a class="xref" href="C1.LiveLinq.Indexing.IndexDefinition-1.KeyIsUnique.html#C1_LiveLinq_Indexing_IndexDefinition_1_KeyIsUnique">KeyIsUnique</a>.</p>
</div>
</div>
