Calculate number of pages in image gallery?

hey!

I’ve made a Image gallery in as3, where it loads images externally, through php and xml.
The images are displayed 12 per page. But because of that I will later upload pictures with php, and will not care about changing anything in the actionscript, I will need to calculate how many pages there will be in my Image gallery.

Let’s say… I have 47 pictures in my database, and I will display these through flash, 12 images per page… “47/12 = ~3,9167” wich does not really return the the number of pages wich would be 4, right? so what do I do?

Thank’s for any help!

Cheers!

//Artheus