Adding this method to the EntityRepository.stub solves a few issues where positive integer are expected.
Afaik this method can never return a negative interger.
/**
* @param array<string, mixed> $criteria
*
* @return int<0, max>
*/
public function count(array $criteria);
Never opened a PR here, so please advice how to proceed.
Also I am puzzled whether return or phpstan-return or psalm-return is the correct way.