Changed run_count() function in com_sales_countsheet class to reduce amount of for loops