The IRequestDictionary::get_Count method determines the total number of items in a collection.
HRESULT STDMETHODCALLTYPE get_Count(
int*cStrRet // pointer to an integer containing the number of items
)
IRequestDictionary, IReadCookie, IWriteCookie