# qds.fnGetChkItemStateCount

## Description
Returns how many times a specific state was recorded for a checklist event.

## Syntax
  <b>qds.fnGetChkItemStateCount(@chkShtEventId, @chkStateId)</b>  
  <br /><br />
  <b>Parameters:</b><br />
  <li>@chkShtEventId (int): Checklist sheet event Id</li>
  <li>@chkStateId (int): Checklist item state Id</li>
  <br />
  <b>Returns:</b><br />
  <li>int: Count of matching checklist item states</li>

### Code Example 

```sql
SELECT qds.fnGetChkItemStateCount(
  2048, 
  3
) AS item_state_count;
