# ParagraphCollection.Count Property

> Gets the number of elements contained in the collection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ParagraphCollection.Count Property
- **417 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/count-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/count-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/count-property/llms-full.txt

---

### Description

Gets the number of elements contained in the collection.

### Syntax

```csharp
public int Count { get; }
```

```vbnet
Public ReadOnly Property Count As Integer
```

### Examples

The following example works with paragraphs in the current document by using `ParagraphCollection.Count`.

```csharp
ParagraphCollection paragraphCollection = textControl.Paragraphs;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";

Console.WriteLine($"Count: {paragraphCollection.Count}");
Console.WriteLine("Paragraph Collection is ready for use.");
```

```vbnet
Dim paragraphCollection As ParagraphCollection = textControl.Paragraphs
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."

Console.WriteLine($"Count: {paragraphCollection.Count}")
Console.WriteLine("Paragraph Collection is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [ParagraphCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/copyto-method/llms-full.txt)
- **Next:** [ParagraphCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getenumerator-method/llms-full.txt)
