added a count feature