If you get this message after switching to php version 7.x, change your code to from count() to count(get_object_vars()).