I am very curious to learn how citation engines work for both books and ebooks. I assume that these computer engines (Scopus, the web of science, Google scholar) take the bibliographic data from papers, review articles and books, and somehow get a unique identifier for each bibliographic entry. Then they associate a counter to each unique identifier, and this counter is increased by one every time a citation is made. I'm speculating here as I'm by no means an expert. But if this is the case, then what happens for a book that is both in paper and electronic version? How is this unique identifier created (is it by the ISBN or by the DOI)?
The answer varies with the service you use. I only know something about two services:
Google scholar: It crawls the web to get a database of publications and citations (and it often counts something as publication which is not one, e.g. slides, lists of presentations…). I guess (but I am not sure) it also gets formatted data from publishers. It tries to identify similar publications (I have no idea how this is done precisely) and it also relies on user input (you can identify two things as the same by yourself if you have a verfied account and Google thinks that you are an author). In my experience, the database Google scholar is quite messy. Wrongly identified authors, lots of non-publications, double or missing citations.
MathSciNet is a service for publications in mathematics run by the American Mathematical Society. It gets data from the publishers and imports it automatically into their database. It has people to check the database, to identify duplicates (very rare, basically only reprints), to keep different authors with same names different and to identify authors who appear under different names or spellings. This is done by hand and also uses user input. As GEdgar points out: MathSciNet is very accurate and pretty fast to fix things.