You have a stack, which you've given a maximum size.
Whenever something is pushed to the stack, the top member is incremented. When pushing to the stack, the size should be checked to make sure there's no overflow.
So, you need to determine what you want getSize to tell you. Do you want it to tell you the maximum size of the stack or the number of elements currently populated?
If it's the former, it's as simple as returning the value to use to create the stack in the first place. If it's the latter, it should be the value currently stored in top, provided that pushing and popping is working as expected.