Added code for count