---
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) &gt; [@loopback/repository](./repository.md) &gt; [CrudConnector](./repository.crudconnector.md) &gt; [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&lt;Entity&gt;</code> | The model class |
|  where | <code>Where&lt;Entity&gt;</code> | The matching criteria |
|  options | <code>Options</code> | Options for the operation |

<b>Returns:</b>

`Promise<Count>`

A promise of number of matching entities


