sql – How to count the columns that were updated in a trigger?

We have the following table Films (id int, name varchar (50), genre varchar (50), classification char (1), year int)

We want to make a trigger that validates that only one field can be updated at the same time of the table.

create trigger tr_peliculasactulizacion on movies for update
ace
begin
    declare @conta int = 0
    if update (id)
        select @ conta + = 1
    if update (name)
        select @ conta + = 1
    if update (genre)
        select @ conta + = 1
    if update (classification)
        select @ conta + = 1
    if update (year)
        select @ conta + = 1
    if @conta> 1
    begin
        rollback tran
        raiserror ('only one field can be updated at a time', 16, 1);
    end
end

The problem is solved but the doubt remains, do not open a way to do it without so much if ?, suppose that tomorrow I have a table of 40 columns!