https://www.koupoukis.gr/computer/internet/php/using-count-directly-in-loopscycles-is-wrong-php/