Counting the ldapsearch results

Hi,

Is there way to count the number of results in the ldapsearch, looking at the manpages i dont see an option,

Using the following ldapsearch command to list attribute (User-Id=100) under my ObjectClass=my-Process, returns the entries matching the User-Id=100, and the problem i face here is i just want find the number of entries matching this filter not the ldapresult

 ldapsearch -x -h <myHost> -p <port> -D <myDNString> -w <passwd> -b <baseDN> -s sub "(&(objectClass=my-Process)(User-Id=100))" name User-Id

The approximate results,

I can do an grep on the search result for the User-Id=100, but I think there could be a better solution for this, Suggestion pls to count the entries

Thanks,
Nagarajan Ganesan