Replaced explicit host name with "localhost".
The "for each" statement is no longer supported in FF 20.

Replaced with the JS 1.7 "Iterator(...)" function.
Connect to localhost, use "counter" as service name.
Connect to localhost.