--- title: "count keys in map()" slug: "basic-count-keys-in-map" updated: 2026-08-11T07:54:17Z published: 2026-08-11T07:54:17Z canonical: "docs.lobstersoftware.com/basic-count-keys-in-map" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # count keys in map() Returns the number of elements in the map **a**. ## Parameters | Parameter | Description | | --- | --- | | a | (optional) Name of the map. Default: "default". | ## Examples A map "myMap" with three elements is defined. | Parameter a | Result | | --- | --- | | myMap | 3 | | myOtherMap | 0 |