Add $mode to Arr:count() method (refs #4516)