Improved count test