added count to log

The loop count is now added to the emit and execute messages. Also,
various fixes to the documentation.