# Function count

- count<T>(array, callbackfn): number

- Counts how many items match the criteria in the callback function.

  #### Type Parameters

  - T

  #### Parameters

  - array: T[]

    The array.

  - callbackfn: ((value: T, index: number, array: T[]) => boolean)

    The filtering function.

    - - (value, index, array): boolean

      - #### Parameters

        - value: T
        - index: number
        - array: T[]

        #### Returns boolean

  #### Returns number

  The number of items that match the filter.