# Statistics
Class
## About
`Statistics` counts the words, characters, and paragraphs of the editor's document and of its selection, and estimates the reading time. Each `Editor` creates one when it is constructed; read it from the editor's read-only `Statistics` property.
```xojo
StatusLabel.Text = Editor.Statistics.Words.ToString + " words, " + Editor.Statistics.ReadingMinutes.ToString + " min read"
```
The counts use the document's plain text, one block at a time: every text block, heading, quote, list item, table cell, caption, and the text of nested nodes, but not images, media, or other content without text. Each property is computed when it is read, so it always matches the current document; read them from the editor's `ContentChanged` and `SelectionChanged` events to show live counts.
- `Words` counts runs of characters between spaces, tabs, and line breaks, so "don't" and "e-mail" are one word each.
- `Characters` counts every character, including spaces and tabs, but not the breaks between paragraphs. `CharactersExcludingSpaces` leaves spaces and tabs out too.
- `Paragraphs` counts lines with at least one visible character.
- `ReadingMinutes` divides `Words` by `WordsPerMinute`, 230 by default, and rounds up.
- `SelectedWords` and `SelectedCharacters` count the selected text while a node is being edited, and the text of the selected nodes otherwise.
## Delegates
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| TextHandler | selectionOnly As Boolean) As String() | selectionOnly As Boolean) As String() | (None) |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Characters | Integer | (None) | Returns the number of characters in the document, including spaces but not the breaks between paragraphs. |
| CharactersExcludingSpaces | Integer | (None) | Returns the number of characters in the document, not counting spaces, tabs, or breaks between paragraphs. |
| Owner | GraffitiProEditor.Editor | (None) | Returns the editor these statistics describe. |
| Paragraphs | Integer | (None) | Returns the number of paragraphs in the document: lines of text with at least one visible character, in every block, list item, and table cell. |
| ReadingMinutes | Integer | (None) | Returns the estimated reading time in whole minutes, rounded up: Words divided by WordsPerMinute. An empty document takes 0 minutes. |
| SelectedCharacters | Integer | (None) | Returns the number of characters in the selection: the selected text while a node is being edited, otherwise the text of the selected nodes. |
| SelectedWords | Integer | (None) | Returns the number of words in the selection: the selected text while a node is being edited, otherwise the text of the selected nodes. |
| Words | Integer | (None) | Returns the number of words in the document. A word is a run of characters between spaces, tabs, or line breaks. |
| WordsPerMinute | Integer | 230 | Gets or sets the reading speed ReadingMinutes assumes, in words per minute. The default is 230. |