code: func pageCount(filename string) (int, error) {
  	n, err := pageCountNative(filename)
  	if err != nil {
  		// fallback to using pdfinfo when internal count failed
  		n, err = pageCountPoppler(filename)
  	}
  	return n, err
  }
docs: // pageCount returns the number of pages in the given PDF file, or an error if
  // it could not be determined. The function may trigger calls to external tools
  // to achieve a valid count after native counting has been tried without
  // success.