The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.
As @maxim_k responded why aren’t you using AutoCADs built in Count command?