# llLinksetDataCountFound

*LSL function*

```lsl
integer integer llLinksetDataCountFound(string pattern);
```

- `string pattern`: A regular expression (regex) search string used to match keys.

- Returns: `integer`
- Energy: 10

The **`llLinksetDataCountFound`** function returns the number of keys in the linkset datastore that match the **pattern** supplied in the **pattern**.

Returns an [integer](https://wiki.secondlife.com/wiki/integer) Count of the keys in the datastore that match the supplied **pattern**.

```lsl title="How to use" frame="terminal"
integer result = llLinksetDataCountFound("");
```

## Specification

**pattern** is a [Regular expression](https://en.wikipedia.org/wiki/Regular_expression).

## Examples

<details open>
<summary>The following regular expression code can be used to count UUID keys. (Such as those use to identify user UUID)</summary>

```lsl
        integer numKeysFound = llLinksetDataCountFound("(?i)^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$",  0, 0);
```

</details>

<details>
<summary>The following code can also be used to count UUID keys in LinksetData memory.</summary>

```lsl
        integer numKeysFound = llLinksetDataCountFound("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",  0, 0);
```

</details>

## Notes

#### Regular Expression Cheat Sheet

## See also

### Functions

- [llLinksetDataAvailable](/functions/llLinksetDataAvailable/)
- [llLinksetDataCountKeys](/functions/llLinksetDataCountKeys/)
- [llLinksetDataDelete](/functions/llLinksetDataDelete/)
- [llLinksetDataDeleteFound](/functions/llLinksetDataDeleteFound/)
- [llLinksetDataFindKeys](/functions/llLinksetDataFindKeys/)
- [llLinksetDataListKeys](/functions/llLinksetDataListKeys/)
- [llLinksetDataRead](/functions/llLinksetDataRead/)
- [llLinksetDataReset](/functions/llLinksetDataReset/)
- [llLinksetDataWrite](/functions/llLinksetDataWrite/)

---

*Source: [LlLinksetDataCountFound](https://wiki.secondlife.com/wiki/LlLinksetDataCountFound) on the Second Life Wiki. Content from the Second Life Wiki article LlLinksetDataCountFound (revision 1219029, 2026-09-10), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llLinksetDataCountFound/
