Hello Eric,
Try the code found on this page instead,
https://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length
Let me know if that doesn’t work.