0.11.5, Windows 10
This quest has a visual counter of 0/2 that only gets updated by defeating grimoires at the bookshelves; however, defeating grimoires by other means (seemingly random battles and/or the grimoire master) will secretly fill this counter but not get updated visually e.g. the counter will sometimes say 0/2 but after you defeat only one bookshelf the realm quest will complete.
This may potentially happen with other things such as slime packs and phase knights but I’ve only confirmed it (three times reproduced) with the grimoires.
Just realized from the realm quest wording perhaps this quest is intended to be for just killing two Grimoire creatures and not packs, in which case I suppose this wouldn’t be a bug, but would just mean it’s very different from all the other realm quests of this type and it is correctly only counting grimoires from the shelves, but only needs two creatures to complete the quest. If intended to be only two grimoires and not two packs of them, then my bad.
Edit: upon immediately killing one bookshelf after entering the realm the realm quest completes, so it seems to be the case you just need to kill two grimoire creatures from a bookshelf, so indeed my bad