tweaks to iterator code
promoted tableCount to a template parameter