Problem with getFailedLoginAttempts() in appfoundation

How to get failed login attempts using appfoundation? It has a function getFailedLoginAttempts() but it doesn’t make any sense.

My code is here:


NativeButton login = new NativeButton(Lang.getMessage("login"), new ClickListener() {

			private static final long serialVersionUID = -5577423546946890721L;

			public void buttonClick(ClickEvent event) {

				username = (String) usernameField.getValue();
				String password = (String) passwordField.getValue();
				try {
					AuthenticationUtil.authenticate(username, password);			
					startApp();	
				} catch (InvalidCredentialsException e) {
                 [i]
/* I need to get failed login attempts here but how can I do that? 
I just can by doing this: AuthenticationUtil.authenticate(username, password).
getFailedLoginAttempts(),  but I need to write try and catch blocks 
(so try and catch blocks in catch block) for authenticate method and this
function will never work, because user won't be authenticated and all 
the time you will go to the other catch block; */
[/i]
					feedbackLabel.setValue(Lang.getMessage("usernameOrPasswordIncorect"));					
				} catch (AccountLockedException e) {
					feedbackLabel.setValue(Lang.getMessage("accountBlocked"));
				}
			}
		});

I wrote all the problem in the comment. I want to print a number of failed login attempts but can’t get this number. Any suggestions?