It looks like the "Count Pages" error is not random, and it's related to the book. When I try to view one of those books, the viewer fails too with this log:
Spoiler:
calibre, version 3.40.5
ERROR: No se pudo abrir el libro electrónico: Fallo al leer el libro, D:\Biblioteca Kindle\Adquisiciones\Edith Maxwell\Delivering the Truth (14494)\Delivering the Truth - Edith Maxwell.epub pulse en «Mostrar detalles» para más información
Traceback (most recent call last):
File "site-packages\calibre\utils\ipc\simple_worker.py", line 291, in main
File "site-packages\calibre\ebooks\oeb\iterator\book.py", line 65, in extract_book
File "site-packages\calibre\customize\conversion.py", line 245, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\epub_in put.py", line 309, in convert
File "site-packages\calibre\ebooks\conversion\plugins\epub_in put.py", line 407, in convert_epub3_nav
File "site-packages\calibre\ebooks\metadata\opf2.py", line 717, in create_manifest_item
OverflowError: Python int too large to convert to C long
Adobe can open them without problem.