How many digital photos on a 5MP camera will fit onto a 512MB card?

That answer is going to depend on the picture quality or compression you select. I suggest searching online for manufacturer's specs on the camera in question. The manufacturer will often provide a table that shows the number of files for different settings. If you're not shooting in RAW or TIF mode, the MB used per shot and shots per card will vary somewhat according to image detail and sometimes the ISO setting as well. So what you get will be a guideline.