The section that you cite was an amendment to the electoral Count Act of 1877, and this revision occurred in DECEMBER of 2022, almost 2 years after the events of January 6, ostensibly to clarify what heretofore had not been clarified, according to many constitutional scholars and attorneys. Apparently this was supposed to make certain that which was not universally agreed to be so.
It is possible that this amendment, if constitutionally challenged at some future date, may not hold up to scrutiny by the SCOTUS. The constitution does not declare that the president of the senate’s role is merely ministerial, as no other duty in the constitution is deemed to be so.
And this is exactly correct. No act of congress can override constitutional law. You can't put conditions on the constitutional roles through laws passed by congress.
It shows a fundamental misunderstanding of how things work for anyone to even voice the opinion that statute law can control constitutional law.