Updating a field in another form when changes occur in current form

Updating a field in another form when changes occur in current form

I have two forms that are linked via a lookup field.

One of the forms is called Add_a_Class and the field is called "Students". The other form is called Add_a_Student and the field is called "Enrolled_Classes"

In my Add_a_Class form, I also have a field called "Number_of _Students_Enrolled". I currently have a workflow on User Input of the "Students" field that Inputs the "Number_of_Students_Enrolled" field:
input.Number_of_Students_Enrolled = input.Students.size();

I would also like to create a workflow for my Add_a_Student form on User Input of the "Enrolled_Classes" field to update the "Number_of_Students_Enrolled" field in my Add_a_Class form. 

Could anyone assist me with how I would write this script?

Thank you!

      Zoho SalesIQ Resources



            Zoho TeamInbox Resources

              Zoho DataPrep Resources


                  Zoho CRM Plus Resources

                    Zoho Books Resources


                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources


                            Zoho Sprints Resources


                              Qntrl Resources


                                Zoho Creator Resources


                                  Zoho WorkDrive Resources




                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now


                                                      Zoho Show Resources


                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.

                                                                  有料プランをご利用の方