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

# Count total portfolios

> Returns the total in the X-Total-Count header with an empty 204 body. Deleted items are not counted.



## OpenAPI

````yaml /pt/openapi/v3-current/ledger.yaml head /v2/organizations/{organization_id}/ledgers/{ledger_id}/portfolios/metrics/count
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  license:
    name: Lerian Studio General License
  title: Midaz Ledger API
  version: 4.0.0
servers:
  - url: https://ledger.sandbox.lerian.net
security: []
tags:
  - name: Account Block Exceptions (v2)
  - name: Account Plan Assignments (v2)
  - name: Account Plans (v2)
  - name: Account Types (v1)
  - name: Account Types (v2)
  - name: Accounts (v1)
  - name: Accounts (v2)
  - name: Asset Rates (v1)
  - name: Assets (v1)
  - name: Assets (v2)
  - name: Balances (v1)
  - name: Balances (v2)
  - name: Billing Calculate (v2)
  - name: Billing Charge (v2)
  - name: Billing Packages (v2)
  - name: Composition (v2)
  - name: Dashboard (v1)
  - name: Dashboard (v2)
  - name: Encryption (v2)
  - name: Fee Charges (v2)
  - name: Fee Debts (v2)
  - name: Fees (v2)
  - name: Holders (v2)
  - name: Instruments (v2)
  - name: Ledgers (v1)
  - name: Ledgers (v2)
  - name: Metadata Indexes (v1)
  - name: Metadata Indexes (v2)
  - name: Operation Routes (v1)
  - name: Operation Routes (v2)
  - name: Operations (v1)
  - name: Operations (v2)
  - name: Organizations (v1)
  - name: Organizations (v2)
  - name: Packages (v2)
  - name: Portfolios (v1)
  - name: Portfolios (v2)
  - name: Protection (v2)
  - name: Segments (v1)
  - name: Segments (v2)
  - name: Transaction Routes (v1)
  - name: Transaction Routes (v2)
  - name: Transactions (v1)
  - name: Transactions (v2)
paths:
  /v2/organizations/{organization_id}/ledgers/{ledger_id}/portfolios/metrics/count:
    head:
      tags:
        - Portfolios (v2)
      summary: Count total portfolios
      description: >-
        Returns the total in the X-Total-Count header with an empty 204 body.
        Deleted items are not counted.
      operationId: countPortfoliosV2
      parameters:
        - description: Organization ID (UUID)
          in: path
          name: organization_id
          required: true
          schema:
            description: Organization ID (UUID)
            type: string
        - description: Ledger ID (UUID)
          in: path
          name: ledger_id
          required: true
          schema:
            description: Ledger ID (UUID)
            type: string
      responses:
        '204':
          description: No Content
          headers:
            Content-Length:
              schema:
                type: string
            X-Total-Count:
              schema:
                type: string
        '422':
          description: Unprocessable Entity
        '500':
          description: Internal Server Error
        default:
          description: Error
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.