A few things that might help.
1 - Quartus gives extremely detailed and powerful reports. For example, in the "Analysis and Synthesis" or "Fitter" section of the report, you can look at the "RAM usage summary" or "Resource Utilization by Entity" or various other sub-sections to determine which components are using which RAM blocks and how many.
2 - My guess is that you've configured the RAM in such a way that it's wasting bits. How are you configuring the altsyncram component? Have a look at page 1 of the following document to see legal configurations for M4K blocks:
http://www.altera.com/literature/hb/cyc2/cyc2_cii51008.pdf 3 - It's also possible that Quartus is inferring RAM blocks from some of your logic. If this is the case, Quartus will inform you during compilation so you can get it from the report section. If you want to ensure this isn't happening:
Assignments->Settings->Analysis and Synthesis Settings->More Settings. Then set "Auto RAM Replacement" and "Auto ROM Replacement" to Off.
Try this:
Set the q bus to 36 bits. Set the number of words to 4352. This should give you 156672 bits of memory. Now, set the maximum block depth to 512 words. Controlling the maximum block depth changes the way the RAM is configured.
Jake