Judy, here is the manual - http/www.camera-usermanual.com/manuals/pentax/Pentax_Optio_X90.pdf
As Ken mentioned above, one page 254, it states that the built-in storage (wrongly referred to as "memory" in the manual) is 31.2 MB) - this 31.2 MB will be adequate for the storage of a few fine quality .jpg photos. Depending on the file size and the picture quality setting (medium, fine, large) the file size may be around 4 MB (as in my Nikon camera).
From the manual (page 254) -
(4000×3000), D (4000×2672)
(4000×2256), F (2992×2992)
6 (3072×2304), f (2592×1944)
h (2048×1536), l (1024×768), m (640×480)
From the above, it appears that the photo size and quality is set at 2048 x 1536 which translates to about 3 MB. This is why you are getting only about 8 photos before the built-in storage (not memory) is full.
The solution is to install and SD or SDHC card -
On page 255 of the manual there is a table that charts out the number of photos that can be stored on the built-in storage (wrongly referred to as memory), and also on the SD/SDHC card at various camera settings that control image (photo) quality and size. See page 54 - The "Menu" button controls all the camera settings. It took me about 6 hours to read and understand the settings on my new Nikon even though I am an experienced pro photographer well versed in technology. It will take you about the same time to learn about your new (second-hand) camera.
Go through the manual and look for the specified SD/SDHC cards approved and the capacities approved.
If you need more info please ask.