Where do you show the form? What you're doing is code is simply creating a new instance of the login form, and reading the nameCount value, which is still at its initialized value: 0.
I think you should use ShowDialog and return the result in a DialogResult. If that's OK, then read the count value.