[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [RefCount](https://evolu.dev/docs/api-reference/common/RefCount) › createRefCountByKey

## Call Signature

```ts
function createRefCountByKey<TKey>(): RefCountByKey<TKey>;
```

Defined in: [packages/common/src/RefCount.ts:90](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/RefCount.ts#L90)

Creates [RefCountByKey](https://evolu.dev/docs/api-reference/common/RefCount/interfaces/RefCountByKey).

## Call Signature

```ts
function createRefCountByKey<TKey, L>(
  options: CreateRefCountByKeyOptions<TKey, L>,
): RefCountByKey<TKey>;
```

Defined in: [packages/common/src/RefCount.ts:93](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/RefCount.ts#L93)

Creates [RefCountByKey](https://evolu.dev/docs/api-reference/common/RefCount/interfaces/RefCountByKey) with custom logical key lookup.