Drupal 7 will officially reach its End of Life on 5 January 2025. This date marks the 14-year anniversary since Drupal 7 was released on 5 January 2011. It is recommended to migrate your site as soon as possible.
The issue is relevant and it affects D 7.x too. After updating to PHP 7.2 I get a warning on clean D7 install:
Warning: count(): Parameter must be an array or an object that implements Countable in _form_validate() (line 1441 of /var/www/docroot/web/includes/form.inc).
I reviewed patch #7 ,
I don't recommend we take anything from this.
have not yet determined if there is anything we can take from this patch
query condition is already countable, does not throw warnings. D7 condition is implemented in a similar way to D8 and D8 uses count() for this. I checked the 8.6.x branch code on this and compared with 7.x and looked at the various query classes and interfaces and implements interface, not only that, I don't see any mention of this actually happening in the wild.
and see if the php 7.2 tests will pass.
**UPDATE** php 7.2 only one fail, see issue below.
I have opened a new issue for that (combining the two patches).
#2947772: Fully support PHP 7.2 in Drupal 7
Seems this issue is duplicated
Look at #2928846: [PHP 7.2] count() parameter must be an array or an object that implements Countable