@loopback/docs
Version:
Documentation for LoopBack 4
38 lines (24 loc) • 1.01 kB
Markdown
---
lang: en
title: 'API docs: repository.crudconnector.count'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.crudconnector.count.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [CrudConnector](./repository.crudconnector.md) > [count](./repository.crudconnector.count.md)
## CrudConnector.count() method
Count matching entities
<b>Signature:</b>
```typescript
count(modelClass: Class<Entity>, where?: Where<Entity>, options?: Options): Promise<Count>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| modelClass | <code>Class<Entity></code> | The model class |
| where | <code>Where<Entity></code> | The matching criteria |
| options | <code>Options</code> | Options for the operation |
<b>Returns:</b>
`Promise<Count>`
A promise of number of matching entities