Does apc cache counts into php memory usage? I am using php-fpm but I am not sure if that is relevant. If apc memory is set to 256MB and php memory limit for individual workers is also 256MB does that mean apc can take all the memory for the php process?
The total memory allocated by apc.shm_size is not counted as part of the memory usage by PHP. But when the pages for a file are mapped into the process address space, these add to the memory usage - but since PHP does not have to read and parse the source code, the memory usage per running instance is a lot lower with APC, and unless you've got a lot of diferent files stored by APC relative to the number of requests, there's usually a large net saving.
This doesn't make a lot of sense - there is no APC process to allocate memory - it's an exension in eavery PHP process which uses a shared memory segment.