Dictionary.Count
----------------

Returns number of keys in the dictionary.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dictionary](component_Dictionary.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Dictionary.Count"; DictionaryRef ) 

**MBS**( **"Dictionary.Count";** /\* Returns number of keys in the dictionary. \*/  
**$DictionaryRef**) /\* The reference number to the dictionary.e.g. $dic \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| DictionaryRef | The reference number to the dictionary. | $dic |

### Result

Returns number or error.

### Description

Returns number of keys in the dictionary.  
### Examples

Query count of a dictionary:

 $count = MBS ("Dictionary.Count"; $Param )  
### See also

- [Dictionary.Clear](DictionaryClear.md)
- [Dictionary.Clone](DictionaryClone.md)
- [Dictionary.Create](DictionaryCreate.md)
- [Dictionary.KeyAtIndex](DictionaryKeyAtIndex.md)
- [Dictionary.List](DictionaryList.md)
- [Dictionary.ToMatrix](DictionaryToMatrix.md)
- [Dictionary.ToText](DictionaryToText.md)
- [Dictionary.ToXML](DictionaryToXML.md)

### Example Databases

- [Dictionary/Pass Parameters with Dictionary](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Dictionary/Pass%20Parameters%20with%20Dictionary.shtml#3ScriptAnchor_)

This function checks for a license.

Created 12nd December 2014 , last changed 1st March 2021

  
[Dictionary.Clone](DictionaryClone.md) - [Dictionary.Create](DictionaryCreate.md)

[HTML Version](DictionaryCount.shtml)