Add numberOfPages to the output json of text-extract functionality