Fixing count the posts function.
better metas and functions for retrieval.