1368 num attempts

@ysahnpark, would you give this a quick code review when you have a chance.  Mainly this is just a small tweak to ips.calculateRemainingAttempts_ but it'd be good for another set of eyes to look at it.