Originally Posted by felgall
The simplest solution with the code you already have is to simply count the entries in the PHP within the while loop. That way you avoid a second call to the database to do the counting there.
can you give an example how to properly do that within the loop?
I need to display states with their individual counts and put into array
like I did with states. I'm not sure how to do that, I'm bad working with