The Ds\Deque::count() function is an inbuilt function in PHP which is used to get the number of elements in the Deque.
public Ds\Deque::count( void ) : int
Parameters: This function does not accept any parameter.
Return Value: This function returns the number of elements in the Deque.
Below programs illustrate the Ds\Deque::count() function in PHP:
Elements in the Deque Ds\Deque Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) Number of elements in the Deque: 6
Elements in the Deque Ds\Deque Object (  => geeks  => for  => geeks ) Number of elements in the Deque: 3
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.