Tab Count to Growl for Safari

The following AppleScript snippet figures out how many tabs are open in the frontmost window and spits it out to Growl. Helps when I don’t feel like counting how many tabs I’ve opened in WebKit/Safari. Note: To get this to work with Safari change WebKit to Safari.

tell application "WebKit"
    set numtabs to index of last tab of front window
    tell application "GrowlHelperApp"
        set the allNotificationsList to {"Number of Tabs"}
        set the enabledNotificationsList to {"Number of Tabs"}
        register as application "Growl AppleScript Sample" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "WebKit"

        notify with name "Number of Tabs" title "Number of Tabs" description "" & numtabs application name "Growl AppleScript Sample"
    end tell
end tell