public function countClientMessages($client)
    {
        return array_sum(array_map(function (Stack $stack) {
            return $this->countStackMessages($stack);
        }, $this->getClientRootStacks($client)));
    }
public function countClientMessages($client)
    {
        return array_sum(array_map(function (Stack $stack) {
            return $this->countStackMessages($stack);
        }, $this->getClientRootStacks($client)));
    }
public function countClientMessages ( $ client ) { return array_sum ( array_map ( function ( Stack $ stack ) { return $ this -> countStackMessages ( $ stack ) ; } , $ this -> getClientRootStacks ( $ client ) ) ) ; }
Count all messages for a client.

@param $client

@return int
Count all messages for a client .