Get array length of a multiple fields of a node content type
Confirmed that as suggested in the comments, the following works quite well:

count($node-&gt;field_categoria_del_libro_presen);


Here the count would be 2 (based on the example in the question).

This works because even though the field_categoria_del_libro_presen property on the node object is a EntityReferenceFieldItemList, it implements (by way of implementing ListInterface) the native PHP \Countable interface.