“Warning: count()” printing in Page templates

Turns out the problem was Jetpack. I looked through the <head> to see where in the stack it was breaking and it was right in the middle of the Jetpack plugin code.

Looks like it’s being worked on here: https://github.com/Automattic/jetpack/issues/8156 under “PHP warnings.” Since Jetpack isn’t necessary for my dev server on this project, I deactivated it and haven’t had any errors since.