Added count to do loc checking