 
     @refresh()
     @subscribe()
+    @updateMessagesCount()
 
   # Only here because Safari's Date parsing *sucks*
   # We throw away the timezone, but you could use it for something...

          type: "DELETE"
          success: =>
            @unselectMessage()
          error: ->
            alert "Error while clearing all messages."



  messagesCount: ->
    $("#messages tr").length - 1

  updateMessagesCount: ->
    title = $("head title")
    title.text(title.text().replace(/^\(\d*\)/, "(#{@messagesCount()})"))

  tabs: ->
    $("#message ul").children(".tab")
