count()

    boolean count()
The count() function returns the number of entries returned by a search operation.

Example:

$ldap = new LDAP();
$ldap->search("(objectClass=person)");

echo $ldap->count() . " entries returned.<br>";
while($attrs = $ldap->fetch()) // Get all the returned attributes
{
	echo "DN is: " . $ldap->getDN();
	echo $attrs["cn"] . "<br>";
}