Is there any way to keep track of number of attempts made by a user to login into his system?
On linux, logins and failed logins are logged in binary format in /var/log/wtmp and /var/log/btmp respectively. In order to view those logs in human readable format, you need to use the command
In OpenBSD there is no /var/log/btmp, but the last command works. Also, the authlog is in /var/log/authlog.
In Solaris the last command works, but (at least on the system I have access to) authlog seems to be empty.