Fix event-handler setting for numberInParty field
Use case-let syntax and guard to check whether calculation is possible