Safari 16.3: some CSS:
--images: 1;
--count: round(up, calc(sqrt(var(--images))), 1);
results `--count == 2!`
As long as the numbers can be controled, you could do sth. like
--count: round(up, calc(sqrt(var(--images)) - 0.01), 1);
but … this is ugly! ceil(1) should be 1. Every calculator agree.
BTW: Firefox has one solution for every root. √x == 0!