Repository: pimcore/pimcore (language: php)

Issue:
[Bug]: $listing->getTotalCount() ignores offsets and limits
### Pimcore version

11.x

### Steps to reproduce

```
$list = new \Pimcore\Model\DataObject\Sample\Listing();
dump($list->getTotalCount()); //output 50
dump(count($list->loadIdList())); //output 50

$list->setoffset(20);
dump($list->getTotalCount()); //output 50
dump(count($list->loadIdList())); //output 30

$list->setlimit(10);
dump($list->getTotalCount()); //output 50
dump(count($list->loadIdList()));` //output 10
```

### Actual Behavior

the `$listing` method `getTotalCounts` ignores `offset `and `limit`

### Expected Behavior

the `$listing` methods `getTotalCounts` should consider `offset `and `limit`


Discussion / hints:
Thank you for reporting!

From what i see, it is not a bug,  what you are looking for is [getCount()](https://github.com/pimcore/pimcore/blob/57504a894a54259ff7ffe1b7c3e5600733a7d60e/models/DataObject/Listing/Dao.php#L86-L95) and not `getTotalCount()`.

Looking forward for an eventually PR to improve the documentation but the issue would be closed

Fix patch:
diff --git a/doc/03_Documents/09_Working_with_PHP_API.md b/doc/03_Documents/09_Working_with_PHP_API.md
index ac90b1b20e2..93ec11479e8 100644
--- a/doc/03_Documents/09_Working_with_PHP_API.md
+++ b/doc/03_Documents/09_Working_with_PHP_API.md
@@ -119,7 +119,8 @@ If you'd like to get also all the unpublished documents, set the following flag:
 
 | Method                  | Arguments                           | Description                                                                                 |
 |-------------------------|-------------------------------------|---------------------------------------------------------------------------------------------|
-| `getTotalCount()`       |                                     | Returns total number of selected rows.                                                      |
+| `getCount()`            |                                     | Returns total number of selected rows.                                                      |
+| `getTotalCount()`       |                                     | Returns total number of selected rows (excluding offset and limit).                         |
 | `getPaginatorAdapter()` |                                     | List implements `\Iterator`, you could use the list as a paginator.                         |
 | `getItems()`            | int $offset, int $itemsCountPerPage | as arguments you have to specify the limit of rows and the offset.                          |
 | `loadIdList()`          |                                     | Returns complete array with id as a row.                                                    |


Test patch: