Implement track_by_identity for get_attempts_num

Thanks to @LuCiAn0 for pointing this out
Merge pull request #509 from hskrasek/2

Implement track_by_identity for get_attempts_num