PostsController and MySQL Count function