count attempts correctly