added entity counter and further debug output