Move count out of loop?