First, determine the PID of one of your Apache processes.
Then you can do something like this:
cat /proc/PIDHERE/status | grep VmRSS
This will yield the (current) resident-set-size of that particular process, similar to:
VmRSS: 304456 kB
This value is as it sounds, it is the size of the process resident in RAM.
Then normalize your unit of measure (4GB * 1024 * 1024 = 4,194,304 KB). Divide:
4194304 KB / 304456 KB = 13.77 processes
Consider that you probably have other processes running on your system that will consume memory too, and ideally you want to minimize swapping, therefore you would not likely want 13 Apache MaxClients configured (using my numbers), you want some amount less (at your discretion).
This is a crude estimate; the size of your Apache processes may grow over time depending on load.