I think the easiest way would be to use the registry to store/REtreive the number from the registry.
Code:
Dim x As Integer
'REtreive on form load
Private Sub Form_Load()
    x = GetSetting("MyProgram", "save", "x", 0)
End Sub

'Store when loged in
Private Sub cmdLogin_Click()
    x = x + 1
    SaveSetting "MyProgram", "save", "x", x
End Sub
Gl,
D!m