Issue #3126965 by jungle, quietone, longwave, mondrake, dww, sja112, xjm: [backport] Replace assert* involving count() and an integer literal with assertCount()