Added functionality for counting and displaying score