Revert for loop precount as it executeed only one time.

Revert attributes loop precount as it is executed only one time.