Added count with query