public function getTotalMessages()
    {
        $sql = 'SELECT COUNT(message_id) FROM ' . $this->messageTable . ' WHERE 1';
        $stmt = $this->getDb()->prepare($sql);
        $stmt->execute();
        return $stmt->fetchColumn();
    }