> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Count entity records

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns how many records an entity holds. Deleted records are not counted.

The count covers the records the calling credential can read, so an entity whose row-level security rules narrow reads returns a smaller number than the entity actually holds. An entity with no `rls` rules returns its full count.

Pass the entity name exactly as [List entity schemas](/api-reference/list-entity-schemas) reports it. To count the app's users, use [Count app users](/api-reference/count-app-users) instead: `User` is served by its own endpoint and never reaches this one.

This endpoint is limited to 100 requests per minute per app, shared with the app's other entity listing calls.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. Workspace API keys are not accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/entities/{entity_name}/count
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/entities/{entity_name}/count:
    get:
      summary: Count entity records
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Returns how many records an entity holds. Deleted records are not
        counted.


        The count covers the records the calling credential can read, so an
        entity whose row-level security rules narrow reads returns a smaller
        number than the entity actually holds. An entity with no `rls` rules
        returns its full count.


        Pass the entity name exactly as [List entity
        schemas](/api-reference/list-entity-schemas) reports it. To count the
        app's users, use [Count app users](/api-reference/count-app-users)
        instead: `User` is served by its own endpoint and never reaches this
        one.


        This endpoint is limited to 100 requests per minute per app, shared with
        the app's other entity listing calls.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app. Workspace API keys are not accepted.</Note>
      operationId: count_entities_api_apps__app_id__entities__entity_name__count_get
      parameters:
        - name: entity_name
          in: path
          required: true
          schema:
            type: string
            title: Entity Name
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app.
            title: App Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The number of readable records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityCountResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: You don't have editor access to this app.
        '404':
          description: App not found, or the app has no entity with this name.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded (100 requests per minute).
components:
  schemas:
    EntityCountResponse:
      properties:
        count:
          type: integer
          title: Count
          description: Number of records you can read in this entity.
          example: 128
      type: object
      required:
        - count
      title: EntityCountResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````