@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
38 lines (24 loc) • 1.08 kB
Markdown
---
lang: en
title: 'API docs: repository.crudrepository.count'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.crudrepository.count.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [CrudRepository](./repository.crudrepository.md) > [count](./repository.crudrepository.count.md)
## CrudRepository.count() method
Count matching records
<b>Signature:</b>
```typescript
count(where?: Where<T>, options?: Options): Promise<Count>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| where | [Where](./filter.where.md)<!-- --><T> | Matching criteria |
| options | [Options](./repository.options.md) | Options for the operations |
<b>Returns:</b>
Promise<[Count](./repository.count.md)<!-- -->>
A promise of number of records matched