A website I am working on has an image gallery. The gallery is multi-page, but it is made from the same .php file. (The content is changed based on a "page" variable).

Do search engines count that as one page or as multiple pages?Are there any common pitfals assosiated with these kinds of pages I should be aware of?

Thanks

The question is rather vague. A PHP document could publish 1 or 2 terms in its URL that are treated as distinct. Or the PHP document could publish a whole string of terms in its URL and the search engines will abandon the URL. These parameters have been considered a necessary evil for many years despite the fact there are (sometimes convoluted) ways to turn the URLs into more human-readable text.

On the other hand, if the same exact URL serves up different content, then you're only going to see the search engines index whatever they find and nothing more. It will be random and periodic at best, chaotic and unpredictable at worst.

That doesn't depend on the URL -- it depends on what the search engine finds embedded in the HTML code that is served during the visit.