MOTOBIT.COM - ASP upload, IIS utility Count Property, read only of Dictionary class

Property, read only | Member of  Multi.Dictionary | Changes | Purchase | Download


Returns the number of items of one specified key or in the Dictionary object.


vCount = Dictionary.Count ([Key as String])

Where Type Optional Default Description
 Key  String  yes    Key item to be counted. 




Count property sample

  Dim D As New Multi.Dictionary
  D.CompareMode = BinaryCompare
  D("Martin") = 3812
  D("Alex") = 2534
  'OK, binary compare
  D.Add "MArtin", 1520
  D.Add "MARtin", 1130
  'There are 4 items in this dictionary
  Debug.Print D.Count
  '"Martin" key has one item
  Debug.Print D.Count("Martin")
  D.CompareMode = TextCompare
  '"Martin" key has 3 items using TextCompare
  Debug.Print D.Count("Martin")

See also

Dictionary.KeysCount, Dictionary.ItemsCount

Other links for Count

Methods of Dictionary class

Add, Connect, Disconnect, Exists, Load, Lock, Remove, RemoveAll, RemoveDictionary, Save, Unlock

Properties of Dictionary class

CompareMode, Count, Dictionaries, Item, Items, ItemsCount, Key, Keys, KeysCount, LockDuration, Name, RefCounter, UniqueKeys


Free threaded dictionary object. Lets you work with unique/non-unique keys, any VARIANT values and connect to other dictionary in the same process.
     Dictionary is a COM class specially designed as a free-threaded dictionary in Application scope of ASP/ASP.Net pages. It also works with script other engines in VB Script and JScript (ASP,ASP.Net, WSH, CHM, HTA), VB Net, Visual basic (VBA - VB 5, VB 6, Word, Excel, Access, ), C#, J#, C++, ASP, ASP.Net, Delphi and with T-SQL OLE functions - see Use ByteArray object article. You can also use the object in other programming environments with COM support, such is PowerBuilder.
     Source code for Dictionary is available within distribution license, please see License page for Multi Dictionary or License page for ASP file upload and ScriptUtilities.


Free-threaded (multithreaded) dictionary object. Lets you work with unique/non-unique keys in VBScript and JScript envinronment (share application/session variables in ASP) or any other programming language. You can share dictionary variables between processes or computers, you can save or restore dictionary variables to a disk, work with keys using regular expression and more.

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail:

Other Motobit links:   IISTracer, real-time IIS monitor   ASP file upload - upload files to ASP. 
ActiveX/VBSScript registry editor  ActiveX NT User account manager  Export MDB/DBF from ASP Active LogFile  Email export  ActiveX/ASP Scripting Dictionary object