The GetCount method of the IEnumRemoteField interface returns the number of fields being pointed to by the enumerator object.
HRESULT GetCount (ULONG *pcelt)