Likeit module count for an entity refrence field in drupal 8 I have Enabled the Like it! module for a content type called "recipe" on my website. I am able to get the value of like count for the recipe in node--recipe.html.twig. Now, in the same content type, I have an entity reference field for recommended recipes. I need to render the value of count for recommended recipes in my node--recipe.html.twig file. what changes are required and in which files please if anyone knows then help? I have very little idea about modules. 

Using Drupal 8.5 


  content['_field_layout']['content']['likeit']['#count']


gives me the value of count for recipe.
Just use hook_preprocess_hook() and get the referenced entities values. 

function YOURTHEME_preprocess_node__recipe(&amp;$variables){
  kint($variables); 
}


For kint() you need to enable devel kint module.

Pass each entity like below:

$like_count = likeit_get_count($entity);


This will provide the likes of the entity that you have passed. Once you get the count pass it in your node--recipe.html.twig