> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Count

## Definition

The total number of **ChartBars** in the charts primary data series.

## Property Value

An **int** value representing the total number of bars.

## Syntax

`ChartBars.Count`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   if(ChartBars != null)
   {
     Print("ChartBars contain " + ChartBars.Count + " bars");
     //Output:  ChartBars contain 73 bars
   }
}
```