more efficient counting on error