getCount doesnt work but in the submitevent function it works